From 67eb9f301ddcf6a34e3c2d775ada18a2f30251f4 Mon Sep 17 00:00:00 2001 From: Dan Rue Date: Tue, 17 Feb 2015 15:14:21 -0600 Subject: [PATCH] Do not mark "skipped" when changed is false When using the "creates" option with the script module, set changed to False if the file already exists. This behavior is consistent with other modules which use "creates", such as command and shell. --- lib/ansible/runner/action_plugins/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/action_plugins/script.py b/lib/ansible/runner/action_plugins/script.py index 3f8fd60cfbd..1159428b4c1 100644 --- a/lib/ansible/runner/action_plugins/script.py +++ b/lib/ansible/runner/action_plugins/script.py @@ -66,7 +66,7 @@ class ActionModule(object): conn=conn, comm_ok=True, result=dict( - skipped=True, + changed=False, msg=("skipped, since %s exists" % creates) ) ) @@ -83,7 +83,7 @@ class ActionModule(object): conn=conn, comm_ok=True, result=dict( - skipped=True, + changed=False, msg=("skipped, since %s does not exist" % removes) ) )