# Ansible installed from yum is unable to connect to windows while Ansible installed via source file is working fine from the same host

**URL:** <https://forum.ansible.com/t/ansible-installed-from-yum-is-unable-to-connect-to-windows-while-ansible-installed-via-source-file-is-working-fine-from-the-same-host/22446>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 1, 2016, 10:13am UTC](https://forum.ansible.com/t/ansible-installed-from-yum-is-unable-to-connect-to-windows-while-ansible-installed-via-source-file-is-working-fine-from-the-same-host/22446 "2016-09-01T10:13:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [September 1, 2016, 10:13am UTC](https://forum.ansible.com/t/ansible-installed-from-yum-is-unable-to-connect-to-windows-while-ansible-installed-via-source-file-is-working-fine-from-the-same-host/22446/1 "2016-09-01T10:13:02Z")

</div>

I am making some centOS based docker containers to be used as Ansible host. Initially, i created a container and installed Ansible from source files. To connect to windows hosts, i installed some modules as and when required. (honestly, i am not sure what all modules i installed)

Now i created another similar docker container only that i installed Ansible and other things via yum, all latest versions. The scripts for linux hosts works fine but the scripts for windows which are working on same host (and same target windows machine) are not working in this new container. Below is the error i get for setup module.

Loaded callback minimal of type stdout, v2.0  
\<10.10.10.10\> ESTABLISH WINRM CONNECTION FOR USER: test on PORT 5986 TO 10.10.10.10  
\<10.10.10.10\> WINRM CONNECT: transport=ssl endpoint=[https://10.10.10.10:5986/wsman](https://10.10.10.10:5986/wsman)  
\<10.10.10.10\> WINRM CONNECTION ERROR: [SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:765)  
Traceback (most recent call last):  
File “/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py”, line 151, in \_winrm\_connect  
self.shell\_id = protocol.open\_shell(codepage=65001) # UTF-8  
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 132, in open\_shell  
res = self.send\_message(xmltodict.unparse(req))  
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 207, in send\_message  
return self.transport.send\_message(message)  
File “/usr/lib/python2.7/site-packages/winrm/transport.py”, line 173, in send\_message  
response = self.session.send(prepared\_request, timeout=self.read\_timeout\_sec)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 596, in send  
r = adapter.send(request, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/adapters.py”, line 497, in send  
raise SSLError(e, request=request)  
SSLError: [SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:765)

windows1 | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “ssl: [SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:765)”,  
“unreachable”: true  
}

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [September 1, 2016, 1:30pm UTC](https://forum.ansible.com/t/ansible-installed-from-yum-is-unable-to-connect-to-windows-while-ansible-installed-via-source-file-is-working-fine-from-the-same-host/22446/2 "2016-09-01T13:30:10Z")

</div>

to get round that issue you need to set

```auto
ansible_winrm_server_cert_validation: ignore

```

```auto

```

In your inventory / group vars

its documented here:

[http://docs.ansible.com/ansible/intro\_windows.html#inventory](http://docs.ansible.com/ansible/intro_windows.html#inventory)

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [September 2, 2016, 10:29am UTC](https://forum.ansible.com/t/ansible-installed-from-yum-is-unable-to-connect-to-windows-while-ansible-installed-via-source-file-is-working-fine-from-the-same-host/22446/3 "2016-09-02T10:29:55Z")

</div>

Thanks, this works.

What i do not understand is why does it work ? Is this something that i will have to put in my inventory files always now ?
