From 73c956366e856502598021756b3f231723af30b0 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 5 Jun 2015 07:15:35 -0400 Subject: [PATCH] Correctly determine failed task state when checking results Fixes #11172 --- lib/ansible/plugins/strategies/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/strategies/__init__.py b/lib/ansible/plugins/strategies/__init__.py index bb839f20f4..57630f4f21 100644 --- a/lib/ansible/plugins/strategies/__init__.py +++ b/lib/ansible/plugins/strategies/__init__.py @@ -149,7 +149,7 @@ class StrategyBase: task_result = result[1] host = task_result._host task = task_result._task - if result[0] == 'host_task_failed' or 'failed' in task_result._result: + if result[0] == 'host_task_failed' or task_result.is_failed(): if not task.ignore_errors: debug("marking %s as failed" % host.name) iterator.mark_host_failed(host)