16 lines
302 B
YAML
16 lines
302 B
YAML
|
#!/usr/bin/env ansible-playbook
|
||
|
# vim:ft=ansible:
|
||
|
---
|
||
|
- hosts: all
|
||
|
serial: 1
|
||
|
tasks:
|
||
|
- name: Check for reboot-required
|
||
|
stat:
|
||
|
path: "/var/run/reboot-required"
|
||
|
register: s
|
||
|
- name: Reboot
|
||
|
reboot:
|
||
|
reboot_timeout: 300
|
||
|
when: s.stat.exists
|
||
|
become: yes
|