ansible_pull(role): add ExecStartPost step rebooting the hosts, if nec.
Add ExecStartPost step rebooting the hosts, if necessary.
This commit is contained in:
parent
bd281713f1
commit
952fbf85c5
1 changed files with 2 additions and 0 deletions
|
@ -14,3 +14,5 @@ ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
|
||||||
--inventory "{{ ansible_pull__inventory }}" \
|
--inventory "{{ ansible_pull__inventory }}" \
|
||||||
"{{ ansible_pull__playbook }}"
|
"{{ ansible_pull__playbook }}"
|
||||||
User={{ ansible_pull__user }}
|
User={{ ansible_pull__user }}
|
||||||
|
# Reboot, if /var/run/reboot-required or /var/run/ansible-reboot-required exist.
|
||||||
|
ExecStartPost=/usr/bin/bash -c 'if [ -e /var/run/reboot-required ] || [ -e /var/run/ansible-reboot-required ]; then sudo systemctl reboot; fi'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue