Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable-2.7] Fix exception when including tasks from handlers (#47307)
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>
- Loading branch information
1 parent
17cd015
commit ce16286
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bugfixes: | ||
- "handlers - fix crash when handler task include tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/integration/targets/handlers/test_handlers_including_task.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Verify handler can include other tasks (#47287) | ||
hosts: testhost | ||
tasks: | ||
- name: include a task from the tasks section | ||
include_tasks: handlers.yml | ||
|
||
- name: notify a handler | ||
debug: | ||
msg: notifying handler | ||
changed_when: yes | ||
notify: include a task from the handlers section | ||
|
||
handlers: | ||
- name: include a task from the handlers section | ||
include_tasks: handlers.yml |