From 318e752b6f6cb1aedf84ee453ba60d424782461f Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 7 Apr 2014 10:51:04 -0400 Subject: [PATCH] Fixes #6845 evaluate changed_when only if task is not skipped --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index eb625c49369..859e04667de 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -873,7 +873,7 @@ class Runner(object): # only run the final checks if the async_status has finished, # or if we're not running an async_status check at all if (module_name == 'async_status' and "finished" in data) or module_name != 'async_status': - if changed_when is not None: + if changed_when is not None and 'skipped' not in data: data['changed'] = utils.check_conditional(changed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars) if failed_when is not None: data['failed_when_result'] = data['failed'] = utils.check_conditional(failed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars)