mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler Fix #47287
This commit is contained in:
parent
335a979f1d
commit
6497049f2a
4 changed files with 25 additions and 1 deletions
|
@ -952,9 +952,12 @@ class StrategyBase:
|
|||
iterator._play.handlers.append(block)
|
||||
iterator.cache_block_tasks(block)
|
||||
for task in block.block:
|
||||
task_name = task.get_name()
|
||||
display.debug("adding task '%s' included in handler '%s'" % (task_name, handler_name))
|
||||
self._notified_handlers[task._uuid] = included_file._hosts[:]
|
||||
result = self._do_handler_run(
|
||||
handler=task,
|
||||
handler_name=task.get_name(),
|
||||
handler_name=task_name,
|
||||
iterator=iterator,
|
||||
play_context=play_context,
|
||||
notified_hosts=included_file._hosts[:],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue