diff options
Diffstat (limited to 'examples/playbooks/no_handler_fail.yml')
-rw-r--r-- | examples/playbooks/no_handler_fail.yml | 27 |
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 |