Service blocks
Table of contents
Blocks that keep services running, stopped, enabled or disabled.
Manage Service
Starts, stops, reloads or restarts a service, or sets whether it starts at boot.
Generates: a services promise.
Settings
| Setting | Required | Description |
|---|---|---|
| Service name | Yes | The service’s name, as the host’s service manager knows it, e.g. nginx or ssh. |
| Action | Yes | Reload and Restart act every time this block runs: connect them with a “repaired” arrow so they only run after a change. One of: Running (and enabled at boot), Stopped (and disabled at boot), Enabled at boot (not started now), Disabled at boot (not stopped now), Reload, Restart. Default: Running (and enabled at boot). |
Example
The policy it generates, for example:
# Keep nginx running
services:
"nginx" service_policy => "start";