community / community.general / 8.5.0 / module / runit Manage runit services Authors: James Sumners (@jsumners)community.general.runit (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Controls runit services on remote hosts using the sv utility.
- name: Start sv dnscache, if not running community.general.runit: name: dnscache state: started
- name: Stop sv dnscache, if running community.general.runit: name: dnscache state: stopped
- name: Kill sv dnscache, in all cases community.general.runit: name: dnscache state: killed
- name: Restart sv dnscache, in all cases community.general.runit: name: dnscache state: restarted
- name: Reload sv dnscache, in all cases community.general.runit: name: dnscache state: reloaded
- name: Use alternative sv directory location community.general.runit: name: dnscache state: reloaded service_dir: /run/service
name: description: - Name of the service to manage. required: true type: str state: choices: - killed - once - reloaded - restarted - started - stopped description: - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the service (sv restart) and V(killed) will always bounce the service (sv force-stop). V(reloaded) will send a HUP (sv reload). V(once) will run a normally downed sv once (sv once), not really an idempotent operation. type: str enabled: description: - Whether the service is enabled or not, if disabled it also implies stopped. type: bool service_dir: default: /var/service description: - directory runsv watches for services type: str service_src: default: /etc/sv description: - directory where services are defined, the source of symlinks to service_dir. type: str