From 1a20b00d1f29d0079e81d2bbdd11a39ac9b18221 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Sun, 26 Feb 2012 22:59:45 -0500 Subject: [PATCH] If the error is an authentication exception - just report it that way don't dump out an unappetizing traceback which just says the same --- lib/ansible/runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index 8361e4970ec..1dd3b65f134 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -108,6 +108,8 @@ class Runner(object): ssh.connect(host, username=self.remote_user, allow_agent=True, look_for_keys=True, password=self.remote_pass) return [ True, ssh ] + except paramiko.AuthenticationException, e: + return [ False, str(e) ] except: # it failed somehow, return the failure string return [ False, traceback.format_exc() ]