diff --git a/README.md b/README.md index 2a66808..9e90b62 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,10 @@ A workflow is a JSON definition with a list of steps, created on the **Workflows ```json { - "params": [{ "name": "host", "label": "Host", "required": true }], + "params": [ + { "name": "host", "label": "Host", "required": true }, + { "name": "service", "type": "select", "options": ["nginx", "myservice"], "default": "myservice" } + ], "steps": [ { "id": "probe", "type": "execute", "command": "ping -c 1 {{host}} >/dev/null && echo UP=yes || echo UP=no", "targets": ["node-01"] }, { "id": "read", "type": "parse" }, @@ -347,7 +350,7 @@ A workflow is a JSON definition with a list of steps, created on the **Workflows { "default": true, "goto": "ask" } ] }, { "id": "ask", "type": "prompt", "message": "{{host}} is down. Restart its service?", "options": ["Restart", "Skip"], "routes": { "Skip": "end" } }, - { "id": "restart", "type": "execute", "command": "systemctl restart myservice", "targets": ["node-01"], "retries": 2 } + { "id": "restart", "type": "execute", "command": "systemctl restart {{service}}", "targets": ["node-01"], "retries": 2 } ] } ``` @@ -360,8 +363,10 @@ A workflow is a JSON definition with a list of steps, created on the **Workflows | `prompt` | `message`, `options`, `key`, `routes` (`{ "