community.general.svc module – Manage daemontools services
Note
This module is part of the community.general collection (version 6.6.2).
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.svc
.
Synopsis
Controls daemontools services on remote hosts using the svc utility.
Parameters
Parameter |
Comments |
---|---|
Should a ‘down’ file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped. Choices:
|
|
Whether the service is enabled or not, if disabled it also implies stopped. Take note that a service can be enabled and downed (no auto restart). Choices:
|
|
Name of the service to manage. |
|
Directory svscan watches for services Default: |
|
Directory where services are defined, the source of symlinks to service_dir. Default: |
|
Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Start svc dnscache, if not running
community.general.svc:
name: dnscache
state: started
- name: Stop svc dnscache, if running
community.general.svc:
name: dnscache
state: stopped
- name: Kill svc dnscache, in all cases
community.general.svc:
name: dnscache
state: killed
- name: Restart svc dnscache, in all cases
community.general.svc:
name: dnscache
state: restarted
- name: Reload svc dnscache, in all cases
community.general.svc:
name: dnscache
state: reloaded
- name: Using alternative svc directory location
community.general.svc:
name: dnscache
state: reloaded
service_dir: /var/service
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication