From 5419b9836306162b6f94bc04c858ec4c3d89ef2e Mon Sep 17 00:00:00 2001 From: Andreas Lutro Date: Fri, 6 Nov 2015 14:25:00 +0100 Subject: [PATCH] return concise error when ssh fails --- salt/client/ssh/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index 5953a696d2..905632dcbd 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -544,6 +544,10 @@ class SSH(object): self.cache_job(jid, host, ret[host], fun) ret = self.key_deploy(host, ret) + + if ret[host].get('stderr', '').startswith('ssh:'): + ret[host] = ret[host]['stderr'] + if not isinstance(ret[host], dict): p_data = {host: ret[host]} elif 'return' not in ret[host]: