Make OSX fallback to paramiko more selective

Only fallback to paramiko now when the ssh password has been set,
either through inventory or via a prompt.

Fixes #9470
This commit is contained in:
James Cammarata 2014-11-03 14:32:15 -06:00
parent 11822f0d57
commit 9ae0fb5bdf

View file

@ -220,7 +220,10 @@ class Runner(object):
# would prevent us from using ssh, and fallback to paramiko.
# 'smart' is the default since 1.2.1/1.3
self.transport = "ssh"
if sys.platform.startswith('darwin'):
if sys.platform.startswith('darwin') and self.remote_pass:
# due to a current bug in sshpass on OSX, which can trigger
# a kernel panic even for non-privileged users, we revert to
# paramiko on that OS when a SSH password is specified
self.transport = "paramiko"
else:
# see if SSH can support ControlPersist if not use paramiko