|
|
|
|
@ -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
|
|
|
|
|
|