I would like to notify a handler in my role by doing something like this:
- name: Notify handler
notify: my_handler
when: this_thing_is_true|bool
But Ansible just whines:
ERROR! no module/action detected in task.
I have tried various wedges, such as:
- name: Notify handler
meta: noop
notify: my_handler
when: this_thing_is_true|bool
But that similarly whines:
[WARNING]: noop task does not support when conditional
Any suggestions?
when:
condition on the actual handler of the event. Your message helped me realize that the warning is referring to the task which notifies the "event handler" in question, even thoughnoop
was not present in the handler task itself.