Add automatic reboots to main playbook

This commit is contained in:
Salt 2021-10-01 09:10:02 -05:00
parent 90da5ad3b1
commit a7aa38a8e9
2 changed files with 14 additions and 0 deletions

13
playbooks/tags_autoreboot.yml Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: tags_autoreboot
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

View File

@ -25,3 +25,4 @@
- import_playbook: playbooks/tags_ansible-pull.yml - import_playbook: playbooks/tags_ansible-pull.yml
# Housekeeping tags for one-off tasks # Housekeeping tags for one-off tasks
- import_playbook: playbooks/tags_docker-prune.yml - import_playbook: playbooks/tags_docker-prune.yml
- import_playbook: playbooks/tags_autoreboot.yml