runit – Manage runit services
runit – Manage runit services
Synopsis
- Controls runit services on remote hosts using the sv utility.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
enabled boolean |
|
Whether the service is enabled or not, if disabled it also implies stopped. |
name string / required |
Name of the service to manage. | |
service_dir string |
Default: "/var/service" |
directory runsv watches for services |
service_src string |
Default: "/etc/sv" |
directory where services are defined, the source of symlinks to service_dir. |
state string |
|
|
Examples
- 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
Status
- This module is guaranteed to have backward compatible interface changes going forward. [stableinterface]
- This module is maintained by the Ansible Community. [community]
Authors
- James Sumners (@jsumners)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/runit_module.html