Create custom service for SystemD or SysV based operating systems.
- SystemD or Init.D on remote
- Ansible >2.5
Name | Default Value | Description |
---|---|---|
service_opts |
{} | Include settings for this role |
Name | Default Value | Description |
---|---|---|
Enabled |
False | |
Description |
Service for {{ item.key }} | |
After |
"" | |
Before |
"" | |
User |
"" | |
Group |
"" | |
Type |
"" | |
PIDfile |
"" | |
OOMScoreAdjust |
"" | |
Nice |
"" | |
ExecStart |
"" | |
ExecStartPre |
"" | |
ExecStartPost |
"" | |
ExecStop |
"" | |
ExecStopPost |
"" | |
ExecReload |
"" | |
Restart |
"" | |
RestartSec |
"" | |
TimeoutSec |
'30' | |
Wants |
"" | |
Requires |
"" | |
Environment |
"" | |
EnvironmentFile |
"" | |
WorkingDirectory |
"" | |
StandardInput |
"" | |
StandardOutput |
"" | |
StandardError |
"" | |
WantedBy |
"" | |
RequiredBy |
"" |
Name | Default Value | Description |
---|---|---|
Enabled |
False | |
User |
"" | |
PIDFile |
"" | |
ExecStart |
"" | |
WorkingDirectory |
"" | |
StandardOutput |
"" | |
StandardError |
"" |
- hosts: node01
roles:
- role: ansible-service-creator
services_opts:
qdrouterd01:
Enabled: Yes
Started: Yes
ExecStart: "qdrouterd -c /etc/qdrouterd/qdrouterd-01.conf"
User: "qdrouterd"
Group: "qdrouterd"
qdrouterd02:
Enabled: No
Started: No
ExecStart: "qdrouterd -c /etc/qdrouterd/qdrouterd-02.conf"
User: "qdrouterd"
Group: "qdrouterd"
- Init.d based on init-script-template
- Apache 2.0
Messaging QE team @ redhat.com
Initial work and current maintainer
- Dominik Lenoch [email protected]