summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/rule-empty-string-compare-fail.yml
blob: 7b4be855401f66fd40ceaf40a2fdb960db891cff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Empty String Compare Fail
  hosts: all
  tasks:
    - name: Shut down # noqa no-changed-when
      ansible.builtin.command: /sbin/shutdown -t now
      when: ansible_os_family == ""
    - name: Shut down # noqa no-changed-when
      ansible.builtin.command: /sbin/shutdown -t now
      when: ansible_os_family !=""
    - name: Shut down # noqa no-changed-when
      ansible.builtin.command: /sbin/shutdown -t now
      when: false
    - name: Shut down # noqa no-changed-when
      ansible.builtin.command: /sbin/shutdown -t now
      when: [ansible_os_family == ""]