ansible / ansible.builtin / v2.4.2.0-1 / module / runit Manage runit services. | "added in version" 2.3 of ansible.builtin" Authors: James Sumners (@jsumners) stableinterface | supported by communityansible.builtin.runit (v2.4.2.0-1) — module
pip
Install with pip install ansible==2.4.2.0.post1
Controls runit services on remote hosts using the sv utility.
# Example action to start sv dnscache, if not running - runit: name: dnscache state: started
# Example action to stop sv dnscache, if running - runit: name: dnscache state: stopped
# Example action to kill sv dnscache, in all cases - runit: name: dnscache state: killed
# Example action to restart sv dnscache, in all cases - runit: name: dnscache state: restarted
# Example action to reload sv dnscache, in all cases - runit: name: dnscache state: reloaded
# Example using alt sv directory location - runit: name: dnscache state: reloaded service_dir: /run/service
name: description: - Name of the service to manage. required: true state: choices: - started - stopped - restarted - killed - reloaded - once description: - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service (sv restart) and C(killed) will always bounce the service (sv force-stop). C(reloaded) will send a HUP (sv reload). C(once) will run a normally downed sv once (sv once), not really an idempotent operation. required: false enabled: choices: - 'yes' - 'no' description: - Wheater the service is enabled or not, if disabled it also implies stopped. required: false service_dir: default: /var/service description: - directory runsv watches for services required: false service_src: default: /etc/sv description: - directory where services are defined, the source of symlinks to service_dir. required: false