Package: ansible-core
Version: 2.19.0-1
Severity: important
Tags: patch upstream
Forwarded: https://github.com/ansible/ansible/issues/85475

Hi Lee,

at Freexian, we ran into a surprising behaviour change of ansible. When
you enable play tags, handlers may no longer be run as expected while
they used to be run in earlier ansible version. This has been reported
upstream and is being discussed there inconclusively thus far.

If we look into the documentation at
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_tags.html,
it clearly says

| Adding tags to handlers
|
| Handlers are a special case of tasks that only execute when notified, as such 
they ignore all tags and cannot be selected for nor against.

Practically speaking, this no longer documents implemented behaviour in
ansible-core >= 2.19. A role tag can now prevent an implicit
flush_handlers from being invoked and therefore handlers may be skipped
this way.

The referenced (but not merged yet) MR
https://github.com/ansible/ansible/pull/85805 practically enables
handlers to be run again.

What do you think about this issue? Do you consider the changed
semantics intentional? Missing handler execution is something that can
go unnoticed. Playbooks appear to work but their effect may not have
been taken.

Helmut

Reply via email to