mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Added DEFAULT_EXECUTABLE as a constant
Use DEFAULT_EXECUTABLE when no executable is passed to _low_level_command_exec Works as a standard constant - can be overridden in all the normal ways and defaults to /bin/sh Motiviation is for a user that only has /bin/bash in /etc/sudoers
This commit is contained in:
@@ -527,7 +527,7 @@ class Runner(object):
|
||||
''' execute a command string over SSH, return the output '''
|
||||
|
||||
if executable is None:
|
||||
executable = '/bin/sh'
|
||||
executable = C.DEFAULT_EXECUTABLE
|
||||
|
||||
sudo_user = self.sudo_user
|
||||
rc, stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable, executable=executable)
|
||||
|
||||
Reference in New Issue
Block a user