mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Show remote host in error message. (#20823)
* Show remote host in error message. * Typos :-/
This commit is contained in:
@@ -258,7 +258,7 @@ class Connection(ConnectionBase):
|
||||
fh.write(to_bytes(in_data))
|
||||
fh.close()
|
||||
except (OSError, IOError):
|
||||
raise AnsibleConnectionFailure('SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh')
|
||||
raise AnsibleConnectionFailure('SSH Error: data could not be sent to remote host "%s". Make sure this host can be reached over ssh' % self.host)
|
||||
|
||||
display.debug('Sent initial data (%d bytes)' % len(in_data))
|
||||
|
||||
@@ -571,7 +571,7 @@ class Connection(ConnectionBase):
|
||||
raise AnsibleError('using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" (or ssh_args in [ssh_connection] section of the config file) before running again')
|
||||
|
||||
if p.returncode == 255 and in_data and checkrc:
|
||||
raise AnsibleConnectionFailure('SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh')
|
||||
raise AnsibleConnectionFailure('SSH Error: data could not be sent to remote host "%s". Make sure this host can be reached over ssh' % self.host)
|
||||
|
||||
return (p.returncode, b_stdout, b_stderr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user