supress a stack trace to show clean ssh error

This commit is contained in:
Thomas S Hatch 2016-08-09 17:24:56 -06:00
parent 9fbfa282fa
commit 11864c31b7

View file

@ -274,7 +274,7 @@ class SSH(object):
'''
if not isinstance(ret[host], dict) or self.opts.get('ssh_key_deploy'):
target = self.targets[host]
if 'passwd' in target or self.opts['ssh_passwd']:
if target.get('passwd', False) or self.opts['ssh_passwd']:
self._key_deploy_run(host, target, False)
return ret
if ret[host].get('stderr', '').count('Permission denied'):