service_action
Manage service lifecycle across Linux hosts: restart, start, stop, update, or recreate in rolling batches. Dry-run first; apply the exact plan hash to confirm the service is back up.
Instructions
restart / start / stop / update (compose pull + up -d) / recreate a service on hosts — a compose project, systemd unit or container from the inventory (remnanode, certbot, remnawave, tailscaled, fail2ban, node_exporter, docker … or your own). Rolling by default (batch 1 for disruptive actions), verified: the service must be up again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | false (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash | |
| batch | No | hosts at a time (rolling). Default depends on the action: 1 for disruptive ones | |
| action | Yes | ||
| target | No | hosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludes | all |
| service | Yes | service name (fleet_hosts details:true lists them) | |
| planHash | No | planHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since | |
| continueOnError | No | keep going after a host fails (default: stop the rollout at the first failure) | |
| skipUnreachable | No | skip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped) |