From c08305a31ffb3ee83146545ebab3909598b8b712 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 10 Aug 2015 13:18:23 -0400 Subject: [PATCH] set script command itself to be sudable and not use the chmod sudoable settings as it can ignore sudo settings for script when become_user is not root fixes #11902 --- lib/ansible/plugins/action/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/action/script.py b/lib/ansible/plugins/action/script.py index 2392851110d..e157ddce06e 100644 --- a/lib/ansible/plugins/action/script.py +++ b/lib/ansible/plugins/action/script.py @@ -83,8 +83,8 @@ class ActionModule(ActionBase): # add preparation steps to one ssh roundtrip executing the script env_string = self._compute_environment_string() script_cmd = ' '.join([env_string, tmp_src, args]) - - result = self._low_level_execute_command(cmd=script_cmd, tmp=None, sudoable=sudoable) + + result = self._low_level_execute_command(cmd=script_cmd, tmp=None, sudoable=True) # clean up after if tmp and "tmp" in tmp and not C.DEFAULT_KEEP_REMOTE_FILES: