--- - name: Reboot hosts: all tasks: - name: Reboot {{ inventory_hostname }} reboot: