refs #8434 - Approach change: Register the copied file and reboot if it does not exist

This commit is contained in:
Xavi Lleó 2025-01-29 12:34:35 +01:00
parent 9b809f168a
commit f2b6f9a404
2 changed files with 8 additions and 5 deletions

View File

@ -2,7 +2,4 @@
service:
name: nagios-nrpe-server
state: restarted
- name: restart-sysctl
service:
name: systemd-sysctl
state: restarted

View File

@ -5,4 +5,10 @@
mode: u=rw,g=r,o=r
owner: root
group: root
notify: restart-sysctl
register: copy_result
- name: Reboot the system if file was copied
reboot:
reboot_timeout: 600
become: true
when: copy_result.changed