If I give it the datacenter, then it complaints about: "msg": "Unable to
gather facts for non-existing VM ansclient111"
However, if I try with vsphere_guest, it works:
>
> - name: gather vm facts
> hosts: modify
> gather_facts: False
> connection: local
> vars_files:
> - group_vars/vault/lab_credentials.yml
> tasks:
> - name: Getting some Facts
> vsphere_guest:
> vcenter_hostname: "{{ vcenter_hostname }}"
> username: "{{ vcenter_user }}"
> password: "{{ vcenter_passwd }}"
> guest: "{{ guest_name }}"
> vmware_guest_facts: true
> validate_certs: no
> register: vmguest_facts
> tags: vmfacts
> - name: debug facts
> debug: msg="vmguest facts are {{ vmguest_facts }}"
> tags: vmfacts
On Wednesday, April 5, 2017 at 11:21:55 AM UTC-4, Kai Stian Olstad wrote:
>
> On 05. april 2017 17:12, Diego Puertas wrote:
> > OK, now I'm using the vmware_guest_facts module, which seems to be the
> way
> > to gather facts now. I'm using the exact same syntax as the example,
> still
> > doesn't work, Ansible asks me for the datacenter name, which is not
> > included in the example:
>
> https://docs.ansible.com/ansible/vmware_guest_facts_module.html#options
> say datacenter is required, so probably error in the example.
> So just add it and see if it works.
>
>
> --
> Kai Stian Olstad
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ef522424-9805-4f61-b5e3-b770934bb21e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.