From 15e781eb5100a3b595227f2a5ec58a581b884cc7 Mon Sep 17 00:00:00 2001 From: Christopher Johnston Date: Wed, 28 Mar 2012 14:09:11 -0700 Subject: [PATCH] add exception check for paramiko if older then 1.7 --- lib/ansible/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/connection.py b/lib/ansible/connection.py index 2a9ec09849..f2866cd538 100755 --- a/lib/ansible/connection.py +++ b/lib/ansible/connection.py @@ -69,7 +69,10 @@ class ParamikoConnection(object): port=self.runner.remote_port ) except Exception, e: - raise errors.AnsibleConnectionFailed(str(e)) + if str(e).find("PID check failed") != -1: + raise errors.AnsibleError("paramiko version issue, please upgrade paramiko on the overlord") + else: + raise errors.AnsibleConnectionFailed(str(e)) return self def exec_command(self, cmd):