connection: raise exception return by SSH (#84592)

Fixes: #58133

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/84624/head
Abhijeet Kasurde 10 months ago committed by GitHub
parent ce392dd86e
commit 6db6d1967e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save