mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
connection: raise exception return by SSH (#84592)
Fixes: #58133 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- ssh - Raise exception when sshpass returns error code (https://github.com/ansible/ansible/issues/58133).
|
||||
@@ -450,6 +450,7 @@ def _handle_error(
|
||||
'Upgrade sshpass to use sshpass_prompt, or otherwise switch to ssh keys.'
|
||||
raise AnsibleError('{0} {1}'.format(msg, details))
|
||||
msg = '{0} {1}'.format(msg, details)
|
||||
raise AnsibleConnectionFailure(msg)
|
||||
|
||||
if return_tuple[0] == 255:
|
||||
SSH_ERROR = True
|
||||
|
||||
Reference in New Issue
Block a user