mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
Let PlayIterator.add_tasks accept empty task lists
PlayIterator.add_tasks raised an error when trying to add an empty task list. This was the root cause of ansible issue #13370.
This commit is contained in:
@@ -399,6 +399,9 @@ class PlayIterator:
|
||||
if state.fail_state != self.FAILED_NONE:
|
||||
return state
|
||||
|
||||
if not task_list:
|
||||
return state
|
||||
|
||||
if state.run_state == self.ITERATING_TASKS:
|
||||
if state.tasks_child_state:
|
||||
state.tasks_child_state = self._insert_tasks_into_state(state.tasks_child_state, task_list)
|
||||
|
||||
Reference in New Issue
Block a user