From fbf8f5bccbb8d0451598dc29a521e657c4763ccc Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Tue, 5 Jul 2016 11:55:13 +0200 Subject: [PATCH] Determine failed hosts with _check_failed_state() (#16566) (cherry picked from commit 8bff6154a602cba1899c45aa41e350bd96f91e77) --- lib/ansible/executor/play_iterator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index 72742c1a34e..142573a4d90 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -472,7 +472,7 @@ class PlayIterator: self._host_states[host.name] = s def get_failed_hosts(self): - return dict((host, True) for (host, state) in iteritems(self._host_states) if state.run_state == self.ITERATING_COMPLETE and state.fail_state != self.FAILED_NONE) + return dict((host, True) for (host, state) in iteritems(self._host_states) if self._check_failed_state(state)) def _check_failed_state(self, state): if state is None: