Add ansible/playbooks/main-reboot-required.yml
This commit is contained in:
parent
d75c5270ad
commit
0a2be1e587
1 changed files with 13 additions and 0 deletions
13
ansible/playbooks/main-reboot-required.yml
Normal file
13
ansible/playbooks/main-reboot-required.yml
Normal 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
|
Loading…
Reference in a new issue