Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sudo cmd not defined #831

Merged
merged 2 commits into from
Aug 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ansible/runner/connection/paramiko_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False):
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)
Expand Down
6 changes: 5 additions & 1 deletion library/pip
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down