Initial commit
This commit is contained in:
12
reboot-if-needed/reboot-if-needed.yaml
Normal file
12
reboot-if-needed/reboot-if-needed.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: check if system reboot is required
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: check if system reboot is required
|
||||
stat:
|
||||
path: /var/run/reboot-required
|
||||
register: reboot_required
|
||||
- name: reboot machine
|
||||
reboot:
|
||||
reboot_timeout: 3600
|
||||
when: reboot_required.stat.exists
|
||||
Reference in New Issue
Block a user