Resolve su bug in paramiko libs

This commit is contained in:
Paul Durivage 2014-01-20 18:12:16 -06:00
parent 24f11168d9
commit 4c84ba74b0
2 changed files with 8 additions and 5 deletions

View file

@ -191,7 +191,7 @@ class Connection(object):
msg += ": %s" % str(e)
raise errors.AnsibleConnectionFailed(msg)
if not self.runner.sudo or not sudoable:
if not (self.runner.sudo and sudoable) and not (self.runner.su and su):
if executable:
quoted_command = executable + ' -c ' + pipes.quote(cmd)
else: