A reboot module only exist for Windows
But this should work pretty well
- name: Reboot
shell: sleep 2 && shutdown -r
async: 1
poll: 0
ignore_errors: true
- name: Waiting for server to come back
wait_for:
host: "{{ inventory_hostname }}"
port: 22
state: started
delay: 30
delegate_to: localhost
--
Kai Stian Olstad