From f7dc5a9515d0a064dc874a71c7f9f484f9940875 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 2 Dec 2015 09:10:20 -0500 Subject: [PATCH] Minor tweak and comment addition to 974a0ce3 --- lib/ansible/executor/play_iterator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index 23ba52edf93..795eed2a8c1 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -396,10 +396,8 @@ class PlayIterator: return None def _insert_tasks_into_state(self, state, task_list): - if state.fail_state != self.FAILED_NONE: - return state - - if not task_list: + # if we've failed at all, or if the task list is empty, just return the current state + if state.fail_state != self.FAILED_NONE or not task_list: return state if state.run_state == self.ITERATING_TASKS: