Merge "tasks: Set Restart option for systemd service file"
This commit is contained in:
commit
51f5adc70b
@ -104,6 +104,7 @@
|
||||
with_items:
|
||||
- { src: "systemd.limits.conf.j2", dest: "limits.conf" }
|
||||
- { src: "systemd.timeout.conf.j2", dest: "timeout.conf" }
|
||||
- { src: "systemd.restart.conf.j2", dest: "restart.conf" }
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
notify:
|
||||
|
9
templates/systemd.restart.conf.j2
Normal file
9
templates/systemd.restart.conf.j2
Normal file
@ -0,0 +1,9 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Service]
|
||||
# Define the condition under which the service will be restarted
|
||||
# on-abort is the most conservative one since that should capture unexpected
|
||||
# failures but also exclude failures due to bad configurations. This is
|
||||
# currently the upstream option as well
|
||||
Restart=on-abort
|
||||
RestartSec=5s
|
Loading…
x
Reference in New Issue
Block a user