ansible_pull(role): add ExecPost step rebooting the hosts, if should be
Some checks failed
/ Ansible Lint (push) Failing after 49s
/ Ansible Lint (pull_request) Failing after 48s

This commit is contained in:
June 2025-10-13 17:12:39 +02:00
commit e65813f584
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -14,3 +14,5 @@ ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
--inventory "{{ ansible_pull__inventory }}" \
"{{ ansible_pull__playbook }}"
User={{ ansible_pull__user }}
# Reboot, if /var/run/reboot-required or /var/run/ansible-reboot-required exist.
ExecPost=/usr/bin/bash 'if [ -e /var/run/reboot-required ] || [ -e /var/run/ansible-reboot-required ]; then sudo systemctl reboot; fi'