1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
This commit is contained in:
Brian Coca 2015-08-10 13:18:23 -04:00
parent 3d481ab4ff
commit c08305a31f

View file

@ -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: