From 2f754f0284cc096f030882ab8f1b3638ffa91c41 Mon Sep 17 00:00:00 2001 From: Sundar Raman Date: Thu, 9 Aug 2012 18:02:21 -0400 Subject: [PATCH] (Re #829) Fix for sudo_cmd not defined --- lib/ansible/runner/connection/paramiko_ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/connection/paramiko_ssh.py b/lib/ansible/runner/connection/paramiko_ssh.py index 4a00a76d112..c347a684fdf 100644 --- a/lib/ansible/runner/connection/paramiko_ssh.py +++ b/lib/ansible/runner/connection/paramiko_ssh.py @@ -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)