iac/ansible/playbooks/maint-reboot-required.yml

13 lines
319 B
YAML
Raw Normal View History

---
- name: check if system reboot is required
hosts: "*"
2025-01-12 22:30:10 -05:00
become: true
tasks:
- name: check if system reboot is required
become: true
stat:
path: /var/run/reboot-required
register: reboot_required
- debug:
msg: "Reboot is required"
when: reboot_required.stat.exists