New in version 2.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
enabled | no |
| Wheater the service is enabled or not, if disabled it also implies stopped. | |
name | yes | Name of the service to manage. | ||
service_dir | no | /var/service | directory runsv watches for services | |
service_src | no | /etc/sv | directory where services are defined, the source of symlinks to service_dir. | |
state | no |
| started /stopped are idempotent actions that will not run commands unless necessary. restarted will always bounce the service (sv restart) and killed will always bounce the service (sv force-stop). reloaded will send a HUP (sv reload). once will run a normally downed sv once (sv once), not really an idempotent operation. |
# 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
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/runit_module.html