New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meta flush_handlers doesn't work in role #79023
Comments
Files identified in the description: If these files are incorrect, please update the |
Thanks for the report. The following is likely the fix: diff --git a/lib/ansible/plugins/strategy/linear.py b/lib/ansible/plugins/strategy/linear.py
index a9406a20748..a268b0b39cc 100644
--- a/lib/ansible/plugins/strategy/linear.py
+++ b/lib/ansible/plugins/strategy/linear.py
@@ -42,6 +42,7 @@ from ansible.plugins.loader import action_loader
from ansible.plugins.strategy import StrategyBase
from ansible.template import Templar
from ansible.utils.display import Display
+from ansible.utils.fqcn import add_internal_fqcns
display = Display()
@@ -118,7 +119,7 @@ class StrategyModule(StrategyBase):
# once hosts synchronize on 'flush_handlers' lockstep enters
# '_in_handlers' phase where handlers are run instead of tasks
# until at least one host is in IteratingStates.HANDLERS
- if (not self._in_handlers and cur_task.action == 'meta' and
+ if (not self._in_handlers and cur_task.action in add_internal_fqcns(('meta',)) and
cur_task.args.get('_raw_params') == 'flush_handlers'):
self._in_handlers = True I will work on making the diff into a PR, until then |
Instead of directly using |
Fixes ansible#79023 (cherry picked from commit e1daaae)
Summary
Triggering handlers with
ansible.builtin.meta: flush_handlers
in a role results in an errorIssue Type
Bug Report
Component Name
meta
Ansible Version
Configuration
OS / Environment
Arch Linux and Debian but probably irrelevant
Steps to Reproduce
Expected Results
I expect the play to succeed and trigger the handler
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: