update readme doc without json5 code
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mathieu Broillet 2023-06-12 10:44:33 +02:00
parent 655ecf21f4
commit ab0363a940
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32

View File

@ -17,7 +17,7 @@ Have a look at the resources folder to see how to use it.
## Configuration
### Proxmox VE
The Proxmox VE configuration is located in the `config.json` file.
```json5
```json
{
"pve":{
"host": "<pve host ip/hostname>",
@ -34,7 +34,7 @@ You can look at the example with ID 100 in the `resources/lxc/100` folder.
Here is an example config with all available parameters :
*Note : this is not valid JSON, it's just for documentation purposes, if you want to copy the file, use the one in the resources folder*
```json5
```json
{
"lxc_hostname": "traefik", //hostname of the lxc
@ -74,6 +74,7 @@ Here is an example config with all available parameters :
"tags": "2-proxy+auth" // tags for the lxc to display in the proxmox web ui
},
```
*Tip : have a look at the [man page](https://pve.proxmox.com/pve-docs/pct.1.html) of the `pct` command to see how the values should look.*
## Creation
In the creation section, you have the option to define conditions for checking whether your LXC/VM has been previously configured.
@ -83,7 +84,7 @@ However, if **any** of the conditions fail to match, the script will process to
## Conditions
### File
The file condition will check if a file exists or not inside the LXC/VM.
```json5
```json
"conditions": {
// use a single file
"file": "/var/data/traefikv2/traefik.toml"
@ -95,7 +96,7 @@ It can be an array of file using ``["file1", "file2"]`` or just one file in doub
### Folder
The folder condition will check if a folder exists or not inside the LXC/VM.
```json5
```json
"conditions": {
// use a single folder
"folder": "/var/data/traefikv2"
@ -107,7 +108,7 @@ It can be an array of folders using ``["folder1", "folder2"]`` or just one folde
### Programs
The programs condition will check if a program is installed or not in the LXC/VM.
```json5
```json
"conditions": {
// use a single program
"program": "docker"
@ -131,7 +132,7 @@ The command condition will check if a command returns a specific value.
### Docker
The docker condition will check if a docker (or podman) container is running or not.
```json5
```json
"conditions": {
// use a single container
"container": "traefikv2"
@ -149,7 +150,7 @@ If nothing is specified, the script will use the VM/LXC folder (`resources/lxc/<
*The comments in the JSON below are only for documentation purposes and are not valid JSON, remove them before running.*
### Script
The script step will execute a script.
```json5
```json
"steps": [
{
"type": "script",
@ -160,7 +161,7 @@ The script step will execute a script.
### File
The file step will copy a file to the VM/LXC.
```json5
```json
"steps": [
{
"type": "file",
@ -172,7 +173,7 @@ The file step will copy a file to the VM/LXC.
### Folder
The folder step will copy a folder to the VM/LXC.
```json5
```json
"steps": [
{
"type": "folder",
@ -184,7 +185,7 @@ The folder step will copy a folder to the VM/LXC.
### Command
The command step will execute a command on the VM/LXC.
```json5
```json
"steps": [
{
"type": "command",
@ -196,7 +197,7 @@ The command step will execute a command on the VM/LXC.
### Docker
The docker step will execute a docker command on the VM/LXC.
```json5
```json
"steps": [
{
"type": "docker",
@ -208,7 +209,7 @@ The docker step will execute a docker command on the VM/LXC.
### Docker-compose
The docker-compose step will execute a docker-compose command on the VM/LXC.
```json5
```json
"steps": [
{
"type": "docker-compose",
@ -221,7 +222,7 @@ The docker-compose step will execute a docker-compose command on the VM/LXC.
### Git
The git step will clone a git repo on the VM/LXC.
```json5
```json
"steps": [
{
"type": "git",
@ -234,7 +235,7 @@ The git step will clone a git repo on the VM/LXC.
### Download
The download step will download a file on the VM/LXC.
```json5
```json
"steps": [
{
"type": "download",
@ -249,7 +250,7 @@ The download step will download a file on the VM/LXC.
### Extract archive (tar/zip)
The unzip step will unzip a file in the VM/LXC.
```json5
```json
"steps": [
{
"type": "unzip",
@ -262,7 +263,7 @@ The unzip step will unzip a file in the VM/LXC.
### Install package
The install-package step will install a package on the VM/LXC.
```json5
```json
"steps": [
{
"type": "install-package",
@ -278,7 +279,7 @@ The install-package step will install a package on the VM/LXC.
### Remove package
The remove-package step will remove a package on the VM/LXC.
```json5
```json
"steps": [
{
"type": "remove-package",
@ -304,7 +305,7 @@ The reboot step will reboot the VM/LXC.
### Replace in file
The replace-in-file step will replace a string in a file.
```json5
```json
"steps": [
{
"type": "replace-in-file",