ANSIBLE: Adding VMware ESX server to Vcenter Failing though Ansible vmware_host module: Certificate Error

40 views
Skip to first unread message

Vijay Misra

unread,
May 14, 2017, 3:58:31 PM5/14/17
to Ansible Project

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 ?

---
- hosts: localhost
  tasks:
       - name: Add ESXi Host to VCSA
         local_action:
           module: vmware_host
           hostname: xxxxxxxxxx
           username: administrator@vsphere.local
           password: xxxxx
           datacenter_name: Datacenter
           cluster_name: cluster1
           esxi_hostname: xxxxx
           esxi_username: root
           esxi_password: xxxx
           state: present

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


Kai Stian Olstad

unread,
May 14, 2017, 4:09:09 PM5/14/17
to ansible...@googlegroups.com
On 14. mai 2017 20:58, Vijay Misra wrote:
> 0down votefavorite
> <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 ?

Rule number one, check the documentation
https://docs.ansible.com/ansible/vmware_host_module.html

--
Kai Stian Olstad

Vijay Misra

unread,
May 14, 2017, 8:38:58 PM5/14/17
to Ansible Project, ansible-pr...@olstad.com
I checked the document before posting. actuallly validate_certs parameter is no longer supported.

Thanks,
Vijay

Matt Martz

unread,
May 14, 2017, 9:06:54 PM5/14/17
to ansible...@googlegroups.com, ansible-pr...@olstad.com
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.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/08fe2850-06c3-4439-9a18-3ea3ac9b99c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Matt Martz
@sivel
sivel.net
Reply all
Reply to author
Forward
0 new messages