-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
handler+include triggered multiple times #18178
Comments
Same here. Anyone have a work-around? This was working fine in 2.0. |
Hi @duck-rh, I'm having trouble reproducing this. Can you (or anyone else seeing this issue) give a full/simple example which reproduces this for you? |
Hi @jimi-c https://github.com/boernd/ansible-18178 Tested with 2.2.0 and latest 2.2.1 rc
|
Attempting to reproduce this with the test role in #18178 (comment)
|
and with '-vvv' output:
|
If I use the config option referenced obliquely in the deprecation blurb, I get:
If I fix up that path, then I see the handler run three times:
|
Adding a 'static: no' to the include in the handler seems to work. roles/test/handlers/main.yml ---
- name: execute handler
include: tasks/handlerlogic.yml
static: no
|
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
ISSUE TYPE
COMPONENT NAME
handlers
ANSIBLE VERSION
This is RC2.
CONFIGURATION
only the roles path is modified.
OS / ENVIRONMENT
Running on Debian unstable and managing CentOS 7.
SUMMARY
To chain multiple actions in a handler I include a file, and this leads to the handler being fired multiple times.
STEPS TO REPRODUCE
I used an include as suggested workaround for #14270.
My handler defined in handlers/main.yml:
The apply_config.yml file contains:
EXPECTED RESULTS
Several changes (during roles tasks) call this trigger, but it should only be executed once.
ACTUAL RESULTS
As you can see it is executed 5 times and breaks playbook execution:
The text was updated successfully, but these errors were encountered: