summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/rule-empty-string-compare-fail.yml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/playbooks/rule-empty-string-compare-fail.yml')
-rw-r--r--examples/playbooks/rule-empty-string-compare-fail.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/playbooks/rule-empty-string-compare-fail.yml b/examples/playbooks/rule-empty-string-compare-fail.yml
new file mode 100644
index 0000000..7b4be85
--- /dev/null
+++ b/examples/playbooks/rule-empty-string-compare-fail.yml
@@ -0,0 +1,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 == ""]