Skip to content

Commit

Permalink
allow bypassing executable setting
Browse files Browse the repository at this point in the history
if you set executable to an empty string this avoids passing one to the command constructor
fixes #14813
  • Loading branch information
bcoca committed Mar 28, 2016
1 parent bbbf7a5 commit e9a4526
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/plugins/action/__init__.py
Expand Up @@ -621,7 +621,8 @@ def _low_level_execute_command(self, cmd, sudoable=True, in_data=None, executabl
if self._connection.allow_executable:
if executable is None:
executable = self._play_context.executable
cmd = executable + ' -c ' + pipes.quote(cmd)
if executable:
cmd = executable + ' -c ' + pipes.quote(cmd)

display.debug("_low_level_execute_command(): executing: %s" % (cmd,))
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
Expand Down

0 comments on commit e9a4526

Please sign in to comment.