mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #831 from cybertoast/feature/sudo_cmd_not_defined
Feature/sudo cmd not defined
This commit is contained in:
commit
86cbfc0448
2 changed files with 6 additions and 2 deletions
|
@ -101,7 +101,7 @@ class ParamikoConnection(object):
|
|||
prompt = '[sudo via ansible, key=%s] password: ' % randbits
|
||||
sudocmd = 'sudo -k && sudo -p "%s" -u %s -- "$SHELL" -c %s' % (
|
||||
prompt, sudo_user, pipes.quote(cmd))
|
||||
vvv("EXEC %s" % sudo_cmd, host=self.host)
|
||||
vvv("EXEC %s" % sudocmd, host=self.host)
|
||||
sudo_output = ''
|
||||
try:
|
||||
chan.exec_command(sudocmd)
|
||||
|
|
|
@ -25,7 +25,11 @@ ENV = None
|
|||
|
||||
|
||||
def _get_full_name(name, version=None):
|
||||
return name if version is None else name + '==' + version
|
||||
if version is None:
|
||||
resp = name
|
||||
else:
|
||||
resp = name + '==' + version
|
||||
return resp
|
||||
|
||||
|
||||
def _find_pip():
|
||||
|
|
Loading…
Reference in a new issue