--- - name: Reboot server shell: "sleep 5 && /sbin/reboot" async: 1 poll: 0 become: true - name: Wait for the reboot to complete wait_for_connection: connect_timeout: 20 sleep: 5 delay: 5 timeout: 300