Skip to content

Commit 88bd617

Browse files
author
lerndevops
authored
Create winrm-issue.md
1 parent 79aae9b commit 88bd617

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

ansible/windows/winrm-issue.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### with winrm there is an issue with connection as shown in error message below, this is an issue with the latest release of pywinrm where it will ignore the server_cert_validation kwarg if REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE environment variables are set. It has been fixed in the master branch but a release hasn't been made with the changes.
2+
3+
##### Error message as below
4+
5+
`Failed to connect to the host via PSRP: HTTPSConnectionPool(host='35.188.96.89', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))",`
6+
7+
8+
## To get around this, you have 5 options
9+
10+
1) Install latest pywinrm from the master branch directly
11+
12+
2) Use the 0.2.2 version of pywinrm which didn't have this issue (you loose out on message encryption :( )
13+
14+
3) Use pypsrp instead. Need to install with pip install pypsrp and set the following vars in your inventory (Note: this requires Ansible 2.7)
15+
16+
```
17+
ansible_user: devops
18+
ansible_password: today@1234
19+
ansible_connection: psrp
20+
#ansible_port: 55986
21+
ansible_psrp_transport: basic
22+
ansible_psrp_cert_validation: ignore
23+
```
24+
25+
4) Don't use SSL with winrm
26+
27+
5) Find out where in windows that these env vars are being set and see if they can be unset

0 commit comments

Comments
 (0)