--- - name: reboot machine hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: reboot machine ansible.builtin.reboot: reboot_timeout: 3600