Hi Helmut,
IMO this is a unexpected change in behaviour, since it's not a documented nor
intended 2.19. I'd expect them to merge it and only change behaviour in 2.23 if
there's an actual plan to do so.
I'm tending to want to wait for upstream to come a conclusion before merging the
change into Debian, though. Though I'm open to feedback.
Greets,
Lee
On 11/09/2025 13:25, Helmut Grohne wrote:
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