Configure ansible-pull.service to restart on failure up to 5 times an hour
This commit is contained in:
parent
b638c1aad0
commit
1d623bfed1
@ -1,12 +1,16 @@
|
|||||||
# vim:ft=dosini:
|
# vim:ft=dosini:
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Ansible pull service
|
Description=Ansible pull service
|
||||||
|
StartLimitIntervalSec=3600
|
||||||
|
StartLimitBurst=5
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=ansible
|
User=ansible
|
||||||
Group=ansible
|
Group=ansible
|
||||||
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
||||||
ExecStart=/usr/local/bin/ansible-pull --accept-host-key -U "{{ ansible_pull_repo }}" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" "{{ ansible_pull_playbook }}"
|
ExecStart=/usr/local/bin/ansible-pull --accept-host-key -U "{{ ansible_pull_repo }}" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" "{{ ansible_pull_playbook }}"
|
||||||
|
Restart=always
|
||||||
|
RestartSec=90
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user