Files
automation/ansible-playbooks/common/reboot-hosts.yml
2026-04-11 16:46:13 +02:00

16 lines
332 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 5 && reboot"
async: 1
poll: 0
ignore_errors: true
- name: Reboot command issues, exiting play
ansible.builtin.meta: end_host