The documentation for Dynamic Inventory makes mention of so many dynamic inventories, but none for VMware.

I really liked the feature of tagging servers in Amazon EC2 and was hoping to re-create a similar system in our VMware environment.

Fetch all servers in vSphere with tags "environment=testing" and "application=helloworld" and run this Ansible playbook on them.

1 Answer 1


Is there a dynamic inventory for VMware in Ansible?

There are two in the official Ansible repository:

Refer to the code and the configuration files (vmware.ini, vmware_inventory.ini) for usage details.

Alternatively you can fetch the VMs facts with vmware_vm_facts module and create your own in-memory inventory with add_host.

  • It is still unclear how to do what the question asked, namely, Fetch all servers in vSphere with tags "environment=testing" and "application=helloworld" Jul 18, 2019 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .