dynamic inventory

Is there a way for dynamic inventory in vmware environmnet. Can we use the tags of VMs to do dynamic invetory in ansible.
Any example would help. Thanks.
Meda.

I’ve been using the vmware_inventory.py inventory script.

The current vmware_inventory.py script uses pyVmomi. The pyVmomi API doesn’t support “tags” because that information is in a different database than where that API can currently query (as it was explained to me). You can use custom attributes though and you would need to set the max_object_level=2 or higher to see them.

For examples on how to use a local inventory script, see the online docs: http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html