Run task by condition
- hosts: all tasks: - name: "Shutdown Debian" command: /sbin/shutdown -t now when: ansible_os_family == "Debian"