Add ansible/playbooks/main-reboot-required.yml

This commit is contained in:
Matt Reeves 2024-08-01 23:02:31 -04:00
parent d75c5270ad
commit 0a2be1e587

View file

@ -0,0 +1,13 @@
---
- name: check if system reboot is required
hosts: "*"
become: yes
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