--- - hosts: "{{ variable_host | default('lab15_standard') }}" gather_facts: no tasks: - name: shutdown hosts command: shutdown -h now # when: ansible_facts['os_family'] == "Debian" become: yes