ansible / ansible.builtin / v2.9.27 / module / runit Manage runit services | "added in version" 2.3 of ansible.builtin" Authors: James Sumners (@jsumners) stableinterface | supported by communityansible.builtin.runit (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Controls runit services on remote hosts using the sv utility.
- name: Start sv dnscache, if not running runit: name: dnscache state: started
- name: Stop sv dnscache, if running runit: name: dnscache state: stopped
- name: Kill sv dnscache, in all cases runit: name: dnscache state: killed
- name: Restart sv dnscache, in all cases runit: name: dnscache state: restarted
- name: Reload sv dnscache, in all cases runit: name: dnscache state: reloaded
- name: Use alternative sv directory location 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: - 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. 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