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
Ansible 2.7 breaks include_tasks in handlers #47287
Comments
Hi @gliech, thank you for submitting this issue! |
Files identified in the description: If these files are inaccurate, please update the |
This bug appears to have been introduced by 5f953d1 |
cc @pablorf-dev |
Specifically the issue appears to be with the following lines: ansible/lib/ansible/plugins/strategy/__init__.py Lines 962 to 964 in 5f953d1
Changing that back to the following resolves the problem, but likely breaks what the commit fixed:
|
Set _notified_handlers for the task's _uuid that is run as a handler Fix ansible#47287
…e#47307) Set _notified_handlers for the task's _uuid that is run as a handler Fix ansible#47287 (cherry picked from commit 6497049) Co-authored-by: Pablo <pablorf.dev@outlook.com>
Set _notified_handlers for the task's _uuid that is run as a handler Fix ansible#47287
Set _notified_handlers for the task's _uuid that is run as a handler Fix #47287 (cherry picked from commit 6497049) Co-authored-by: Pablo <pablorf.dev@outlook.com>
Set _notified_handlers for the task's _uuid that is run as a handler Fix ansible#47287
@sivel doesn't work in 2.7.7 Ansible version:
Code:
Handler:
Error:
|
SUMMARY
Using the include_tasks module inside a handler results in an unexpected exception in Ansible 2.7 . The same code runs as expected in Ansible 2.6.5 .
ISSUE TYPE
COMPONENT NAME
include_tasks
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
The problem was first identified in a role that updates a VM Hypervisor on Scientific Linux 7 hosts, where include_tasks was used inside a handler to loop over a list of VMs as part of the cleanup after an update.
The problem was confirmed using the minimal example that is provided below on Scientific Linux 7 and on Ubuntu 18.04 running in a bento/ubuntu-18.04 vagrant box.
STEPS TO REPRODUCE
Just run
ansible-playbook playbook.yml
under Ansible 2.7 in a directory where the following two files are present. Alternatively you can run this Vagrantfile to reproduce the issue.playbook.yml
include.yml
EXPECTED RESULTS
The play should conclude without errors. The following ist the verbatim output of the minimal example when run with Ansible 2.6.5
ACTUAL RESULTS
The play run fails for a host after a handler is executed that contains an include_tasks module.
The text was updated successfully, but these errors were encountered: