From 9ae0fb5bdfc3531b02ad0436a46dba887972d7e1 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 3 Nov 2014 14:32:15 -0600 Subject: [PATCH] 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 --- lib/ansible/runner/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 1265f79efe9..4ef6f0ceab1 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -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