mirror of https://github.com/ansible/ansible.git
Backport: Raise AnsibleConnectionError on winrm connnection errors (#52227)
* Raise AnsibleConnectionError on winrm con errors Currently all uncaught exceptions of the requests library that is used in winrm will lead to an "Unexpected failure during module execution". Instead of letting all exceptions bubble up we catch the connection related errors (inkl. timeouts) and re-raise them as AnsibleConnectionError so Ansible will mark the host as unreachable and exit with the correct return code. This is especially important for Zuul (https://zuul-ci.org) to distinguish between failures and connection/host related errors. * Update lib/ansible/plugins/connection/winrm.py Co-Authored-By: westphahl <westphahl@gmail.com> * Add changelog fragmentpull/52351/head
parent
805c9fa712
commit
b97caade8a
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- Raise AnsibleConnectionError on winrm connnection errors
|
Loading…
Reference in New Issue