VMware Cloud Community
nettech1
Expert
Expert

vmware_guest_info error: unrecognized arguments

I am almost sure I have the syntax wrong, but cant seem to find an example of the correct usage.

What is the correct syntax to specify the datacenter name for the vmware_guest_info module?

arg.jpg

er.jpg

I also get the same error if I use datacenter: "{{ Datacenter }}" as shown in the playbook example

ping.png

Thanks

0 Kudos
1 Reply
kurobuti
Contributor
Contributor

You can execute it by the following procedure.

export VMWARE_HOST=vcenter host

export VMWARE_USERNAME=administrator@vsphere.local

export VMWARE_PASSWORD=password

export VMWARE_VALIDATE_CERTS=False

ansible localhost -c local, -m vmware_guest_info -a "datacenter=DC name=test_vm1"

0 Kudos