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"