Files
automation/ansible-playbooks/common/reboot-hosts.yml

16 lines
342 B
YAML

---
- name: Reboot Managed Hosts
hosts: all
become: true
become_method: sudo
tasks:
- name: Trigger reboot with a slight delay
ansible.builtin.shell: "sleep 15 && shutdown -r now"
async: 1
poll: 0
ignore_errors: true
- name: Reboot command issues, exiting play
ansible.builtin.meta: end_host