Commit 24b830bb by Brian Coca

fixed executable for raw module

parent c4b6d912
...@@ -412,26 +412,22 @@ class ActionBase: ...@@ -412,26 +412,22 @@ class ActionBase:
debug("done with _execute_module (%s, %s)" % (module_name, module_args)) debug("done with _execute_module (%s, %s)" % (module_name, module_args))
return data return data
def _low_level_execute_command(self, cmd, tmp, sudoable=True, in_data=None): def _low_level_execute_command(self, cmd, tmp, sudoable=True, in_data=None, executable=None):
''' '''
This is the function which executes the low level shell command, which This is the function which executes the low level shell command, which
may be commands to create/remove directories for temporary files, or to may be commands to create/remove directories for temporary files, or to
run the module code or python directly when pipelining. run the module code or python directly when pipelining.
''' '''
if executable is not None:
cmd = executable + ' -c ' + cmd
debug("in _low_level_execute_command() (%s)" % (cmd,)) debug("in _low_level_execute_command() (%s)" % (cmd,))
if not cmd: if not cmd:
# this can happen with powershell modules when there is no analog to a Windows command (like chmod) # this can happen with powershell modules when there is no analog to a Windows command (like chmod)
debug("no command, exiting _low_level_execute_command()") debug("no command, exiting _low_level_execute_command()")
return dict(stdout='', stderr='') return dict(stdout='', stderr='')
#FIXME: disabled as this should happen in the connection plugin, verify before removing
#prompt = None
#success_key = None
#
#if sudoable:
# cmd, prompt, success_key = self._connection_info.make_become_cmd(cmd)
debug("executing the command %s through the connection" % cmd) debug("executing the command %s through the connection" % cmd)
rc, stdin, stdout, stderr = self._connection.exec_command(cmd, tmp, in_data=in_data, sudoable=sudoable) rc, stdin, stdout, stderr = self._connection.exec_command(cmd, tmp, in_data=in_data, sudoable=sudoable)
debug("command execution done") debug("command execution done")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment