summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2016-09-29 17:19:17 -0400
committerBrian Coca <bcoca@users.noreply.github.com>2016-09-30 17:58:19 -0400
commit24e81ddd1c089f7625e5b6f76a705b20a2372d8e (patch)
tree0ee237e8ceb20a62cd89bbccbcee99d7a9027141
parente4ee9de3f4fd77f8d445724b170a2854efcf68c1 (diff)
downloadansible-24e81ddd1c089f7625e5b6f76a705b20a2372d8e.tar.gz
add ssh error message to failure
-rw-r--r--lib/ansible/plugins/connection/ssh.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py
index 98ab6b08fd..53bc05fb27 100644
--- a/lib/ansible/plugins/connection/ssh.py
+++ b/lib/ansible/plugins/connection/ssh.py
@@ -148,9 +148,6 @@ class Connection(ConnectionBase):
if self._play_context.verbosity > 3:
self._command += ['-vvv']
- elif binary == self._play_context.ssh_executable:
- # Older versions of ssh (e.g. in RHEL 6) don't accept sftp -q.
- self._command += ['-q']
# Next, we add [ssh_connection]ssh_args from ansible.cfg.
@@ -611,7 +608,7 @@ class Connection(ConnectionBase):
if return_tuple[0] != 255:
break
else:
- raise AnsibleConnectionFailure("Failed to connect to the host via ssh.")
+ raise AnsibleConnectionFailure("Failed to connect to the host via ssh: %s" % to_native(return_tuple[2]))
except (AnsibleConnectionFailure, Exception) as e:
if attempt == remaining_tries - 1:
raise