Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path.

This commit is contained in:
Bruno BAILLUET 2014-09-27 17:39:49 +02:00
commit a25da4af05
8 changed files with 12 additions and 7 deletions

View file

@ -225,7 +225,7 @@ class Connection(object):
width=int(os.getenv('COLUMNS', 0)),
height=int(os.getenv('LINES', 0)))
if self.runner.sudo or sudoable:
shcmd, prompt, success_key = utils.make_sudo_cmd(sudo_user, executable, cmd)
shcmd, prompt, success_key = utils.make_sudo_cmd(self.runner.sudo_exe, sudo_user, executable, cmd)
elif self.runner.su or su:
shcmd, prompt, success_key = utils.make_su_cmd(su_user, executable, cmd)