community.general.runit module – Manage runit services
Note
This module is part of the community.general collection (version 9.5.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.runit
.
Synopsis
- Controls runit services on remote hosts using the sv utility.
Parameters
Parameter | Comments |
---|---|
enabled boolean | Whether the service is enabled or not, if disabled it also implies stopped. Choices:
|
name string / required | Name of the service to manage. |
service_dir string | directory runsv watches for services Default: |
service_src string | directory where services are defined, the source of symlinks to service_dir. Default: |
state string |
Choices:
|
Attributes
Attribute | Support | Description |
---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Examples
- 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
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/runit_module.html