summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/no_handler_fail.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
commit2fe34b6444502079dc0b84365ce82dbc92de308e (patch)
tree8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /examples/playbooks/no_handler_fail.yml
parentInitial commit. (diff)
downloadansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz
ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/playbooks/no_handler_fail.yml')
-rw-r--r--examples/playbooks/no_handler_fail.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/playbooks/no_handler_fail.yml b/examples/playbooks/no_handler_fail.yml
new file mode 100644
index 0000000..28840ce
--- /dev/null
+++ b/examples/playbooks/no_handler_fail.yml
@@ -0,0 +1,27 @@
+---
+- name: Fixture for no-handler rule
+ hosts: all
+ tasks:
+ - name: This should trigger no-handler rule # noqa: no-changed-when
+ ansible.builtin.command: echo could be done better
+ when: result is changed
+
+ - name: Do anything # noqa: no-changed-when
+ ansible.builtin.command: echo 123
+ when:
+ - something.changed
+
+ - name: This should be a handler
+ ansible.builtin.debug:
+ msg: why isn't this a handler
+ when: result.changed
+
+ - name: This should be a handler 3 # noqa: literal-compare
+ ansible.builtin.debug:
+ msg: why isn't this a handler
+ when: result.changed == true
+
+ - name: This should be a handler 4 # noqa: literal-compare
+ ansible.builtin.debug:
+ msg: why isn't this a handler
+ when: result['changed'] == true