--- - hosts: all gather_facts: false become: true tasks: - name: "Rebooting {{ inventory_hostname }}..." ansible.builtin.debug: msg: "Rebooting now..." - name: "Reboot {{ inventory_hostname }}" ansible.builtin.reboot: