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

13 lines
318 B
YAML
Raw Permalink Normal View History

---
- 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