--- - name: Reboot machine hosts: "{{ Daily_Reboot_Hosts }}" become: yes become_method: sudo tasks: - name: Reboot machine command: /sbin/reboot async: 1 poll: 0 - name: Wait for systems to become reachable wait_for_connection: