diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index fd59478ead9..23ba52edf93 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -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)