From 2fe34b6444502079dc0b84365ce82dbc92de308e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:06:49 +0200 Subject: Adding upstream version 6.17.2. Signed-off-by: Daniel Baumann --- examples/playbooks/no_handler_fail.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/playbooks/no_handler_fail.yml (limited to 'examples/playbooks/no_handler_fail.yml') 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 -- cgit v1.2.3