fixed wrong readme doc

This commit is contained in:
Mathieu Broillet 2023-06-13 15:29:51 +02:00
parent 00f14332e0
commit fda5e0733a
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32

View File

@ -90,8 +90,8 @@ The file condition will check if a file exists or not inside the LXC/VM.
"conditions": { "conditions": {
// use a single file // use a single file
"file": "/var/data/traefikv2/traefik.toml" "file": "/var/data/traefikv2/traefik.toml"
// or use a list, but only use one // or use a list
"files": ["/var/data/traefikv2/traefik.toml", "/var/data/config/traefikv2/docker-compose.yml"] "file": ["/var/data/traefikv2/traefik.toml", "/var/data/config/traefikv2/docker-compose.yml"]
} }
``` ```
It can be an array of file using ``["file1", "file2"]`` or just one file in double quote ``"file"``. It can be an array of file using ``["file1", "file2"]`` or just one file in double quote ``"file"``.
@ -102,8 +102,8 @@ The folder condition will check if a folder exists or not inside the LXC/VM.
"conditions": { "conditions": {
// use a single folder // use a single folder
"folder": "/var/data/traefikv2" "folder": "/var/data/traefikv2"
// or use a list, but only use one // or use a list
"folders": ["/var/data/traefikv2", "/var/data/config/traefikv2"] "folder": ["/var/data/traefikv2", "/var/data/config/traefikv2"]
} }
``` ```
It can be an array of folders using ``["folder1", "folder2"]`` or just one folder in double quote ``"file"``. It can be an array of folders using ``["folder1", "folder2"]`` or just one folder in double quote ``"file"``.
@ -114,8 +114,8 @@ The programs condition will check if a program is installed or not in the LXC/VM
"conditions": { "conditions": {
// use a single program // use a single program
"program": "docker" "program": "docker"
// or use a list, but only use one // or use a list
"programs": ["docker", "docker-compose"] "program": ["docker", "docker-compose"]
} }
``` ```
It can be an array of programs using ``["program1", "program2"]`` or just one program in double quote ``"program"``. It can be an array of programs using ``["program1", "program2"]`` or just one program in double quote ``"program"``.
@ -138,7 +138,7 @@ The docker condition will check if a docker (or podman) container is running or
"conditions": { "conditions": {
// use a single container // use a single container
"container": "traefikv2" "container": "traefikv2"
// or use a list, but only use one // or use a list
"container": ["traefikv2", "portainer"] "container": ["traefikv2", "portainer"]
} }
``` ```
@ -157,7 +157,7 @@ The script step will execute a script.
{ {
"type": "script", "type": "script",
// use path for local scripts // use path for local scripts
"path": "/global/install-docker.sh" // local path (here: resources/scripts/install-docker.sh) "local_path": "global/install-docker.sh" // local path (here: resources/scripts/install-docker.sh)
// or use url for remote scripts // or use url for remote scripts
"url": "https://xyz.abc/scripts/install-docker.sh" // remote url "url": "https://xyz.abc/scripts/install-docker.sh" // remote url
// or use lxc_path for scripts inside the lxc // or use lxc_path for scripts inside the lxc
@ -182,7 +182,7 @@ The file step will create / copy a file to the VM/LXC.
{ {
"type": "file_copy", "type": "file_copy",
"path": "traefik.toml", // local path (here: resources/lxc/<id>/traefik.toml) "path": "traefik.toml", // local path (here: resources/lxc/<id>/traefik.toml)
"destination": "/var/data/traefikv2/traefik.toml", // lxc/vm path "destination": "/var/data/traefikv2/", // lxc/vm path
"permissions": "644" // (optional) permissions of the file "permissions": "644" // (optional) permissions of the file
} }
] ]
@ -204,8 +204,8 @@ The folder step will copy a folder to the VM/LXC.
"steps": [ "steps": [
{ {
"type": "folder_copy", "type": "folder_copy",
"path": "/data/", // local path (here: resources/lxc/<id>/data/) "path": "data/", // local path (here: resources/lxc/<id>/data/)
"destination": "/var/data/traefikv2", // lxc/vm path "destination": "/var/", // lxc/vm path
"permissions": "755" // (optional) permissions of the folder "permissions": "755" // (optional) permissions of the folder
} }
] ]
@ -260,7 +260,7 @@ The git step will clone a git repo on the VM/LXC.
} }
] ]
``` ```
*Note: At the the moment, no authentication is supported, so only works on public repo.* *Note: At the moment, no authentication is supported, so only works on public repo.*
### Download ### Download
The download step will download a file on the VM/LXC. The download step will download a file on the VM/LXC.
@ -270,8 +270,8 @@ The download step will download a file on the VM/LXC.
"type": "download", "type": "download",
// download a single file // download a single file
"url": "https://git.abc.xyz/file.tar.gz", // download url "url": "https://git.abc.xyz/file.tar.gz", // download url
// or use a list of urls, but only use one // or use a list of urls
"urls": ["https://git.abc.xyz/file1.tar.gz", "https://git.abc.xyz/file2.tar.gz"] // download urls "url": ["https://git.abc.xyz/file1.tar.gz", "https://git.abc.xyz/file2.tar.gz"] // download urls
"destination": "/tmp/" // lxc/vm path "destination": "/tmp/" // lxc/vm path
} }
] ]
@ -298,8 +298,8 @@ The install-package step will install a package on the VM/LXC.
"type": "install-package", "type": "install-package",
// install a single package // install a single package
"package": "git", "package": "git",
// or use a list of packages, but only use one // or use a list of packages
"packages": ["git", "docker"] "package": ["git", "docker"]
} }
] ]
``` ```
@ -314,8 +314,8 @@ The remove-package step will remove a package on the VM/LXC.
"type": "remove-package", "type": "remove-package",
// remove a single package // remove a single package
"package": "git" "package": "git"
// or use a list of packages, but only use one // or use a list of packages
"packages": ["git", "docker"] "package": ["git", "docker"]
} }
] ]
``` ```
@ -357,8 +357,8 @@ The replace-in-file step will replace a string in a file.
"type": "replace-in-file", "type": "replace-in-file",
// replace in a single file // replace in a single file
"path": "/var/data/config/traefikv2/traefik.toml", // inside lxc/vm "path": "/var/data/config/traefikv2/traefik.toml", // inside lxc/vm
// or use a list of files, but only use one // or use a list of files
"paths": ["/var/data/config/traefikv2/traefik.toml", "/var/data/config/traefikv2/traefik2.toml"] // inside lxc/vm "path": ["/var/data/config/traefikv2/traefik.toml", "/var/data/config/traefikv2/traefik2.toml"] // inside lxc/vm
"search": "abc", // string to search "search": "abc", // string to search
"replace": "xyz", // string to replace "replace": "xyz", // string to replace
"case_sensitive": true, // (optional) case sensitive? default: true "case_sensitive": true, // (optional) case sensitive? default: true