# ANSIBLE: Adding VMware ESX server to Vcenter Failing though Ansible vmware\_host module: Certificate Error

**URL:** <https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482>\
**Category:** Ansible Project\
**Tags:** vmware, ubuntu\
**Created:** [May 14, 2017, 6:58pm UTC](https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482 "2017-05-14T18:58:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@Victor1](https://forum.ansible.com/u/Victor1)\
**Post date:** [May 14, 2017, 6:58pm UTC](https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482/1 "2017-05-14T18:58:33Z")

</div>

> |   
>   
> 0down vote[favorite](http://stackoverflow.com/questions/43967500/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host#)  
>   
>   
> |   
>   
>   
> I am trying to add an ESX host to a vcenter server using Ansible code and vmware\_host module. It’s failing in Certification validation. is there any workaround for this ?  
>   
>   
>   
> `<br>---<br>- hosts: localhost<br> tasks:<br> - name: Add ESXi Host to VCSA<br> local_action:<br> module: vmware_host<br> hostname: xxxxxxxxxx<br> username: administrator@vsphere.local<br> password: xxxxx<br> datacenter_name: Datacenter<br> cluster_name: cluster1<br> esxi_hostname: xxxxx<br> esxi_username: root<br> esxi_password: xxxx<br> state: present<br>`  
>   
>   
>   
> here is the output of my command run.'  
>   
>   
>   
> xxxx@ubuntu:/etc/ansible$ sudo ansible-playbook sample.yml [WARNING]: provided hosts list is empty, only localhost is available  
>   
>   
>   
> PLAY \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
>   
>   
>   
> TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ok: [localhost]  
>   
>   
>   
> TASK [Add ESXi Host to VCSA] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:590)”}  
>   
>   
>   
> PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* localhost : ok=1 changed=0 unreachable=0 failed=1  
>   
>   
>   
>   
> |

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 14, 2017, 8:08pm UTC](https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482/2 "2017-05-14T20:08:34Z")

</div>

Rule number one, check the documentation  
[https://docs.ansible.com/ansible/vmware\_host\_module.html](https://docs.ansible.com/ansible/vmware_host_module.html)

---

<div class="post-metadata">

**Author:** ![Victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@Victor1](https://forum.ansible.com/u/Victor1)\
**Post date:** [May 15, 2017, 12:38am UTC](https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482/3 "2017-05-15T00:38:58Z")

</div>

I checked the document before posting. actuallly validate\_certs parameter is no longer supported.

Thanks,  
Vijay

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [May 15, 2017, 1:06am UTC](https://forum.ansible.com/t/ansible-adding-vmware-esx-server-to-vcenter-failing-though-ansible-vmware-host-module-certificate-error/24482/4 "2017-05-15T01:06:26Z")

</div>

What brought you to that conclusion?

I don’t see that indicated anywhere on that docs page. Using validate\_certs is supported by the module.
