From 928a0863c2b184435c8d6520bdae3d56a40ecac0 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 9 Mar 2016 15:18:37 -0500 Subject: [PATCH] corrected changed_when handling --- lib/ansible/executor/task_executor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index fc1877d2b3a..ec456843273 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -447,12 +447,10 @@ class TaskExecutor: # helper methods for use below in evaluating changed/failed_when def _evaluate_changed_when_result(result): - if self._task.changed_when: + if self._task.changed_when is not None and self._task.changed_when: cond = Conditional(loader=self._loader) cond.when = self._task.changed_when result['changed'] = cond.evaluate_conditional(templar, vars_copy) - else: - result['changed'] = False def _evaluate_failed_when_result(result): if self._task.failed_when: