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:
parent
3c25ae2e10
commit
1f1febaa0d
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue