From dbff3a6bbc3732cb7f2f4e7ed1e3f4e91661cd5d Mon Sep 17 00:00:00 2001 From: nitzmahone Date: Wed, 9 Mar 2016 17:48:59 -0800 Subject: [PATCH] Fix blind override in failed_when caused all task failures to be success --- lib/ansible/executor/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 2571b325885..beceef18481 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -465,7 +465,7 @@ class TaskExecutor: result['failed_when_result'] = result['failed'] = failed_when_result else: failed_when_result = False - result['failed'] = False + result['failed'] = result.get('failed', False) return failed_when_result if 'ansible_facts' in result: