Also posted here: https://github.com/ansible/awx/issues/386
SUMMARY
What I want to do is create an inventory of all vm’s on my vSphere that start with “web-”.
I’ve read http://docs.ansible.com/ansible-tower/latest/html/userguide/inventories.html#vmware-vcenter and spent several hours experimenting with both smart and regular inventories on my test instance of AWX.
I have been able to create a regular inventory and add a vmware source to it. That source then pulls in every single vm we have. I have not been able to make the vmware source filter out all but the “web-” vm’s.
I’ve been able to create a smart inventory that looks that vmware regular inventory and filters out all but the hosts I want.
Is that how I am supposed to do it?
Information about my setup:
Docker version 17.09.0-ce, build afdb6d4 AWX from github, devel branch. Last commit: d02221702fd680cd38068ec49597a7b627228c04 Installed using the docker instructions.
Related questions:
- What syntax can I use in the “INSTANCE FILTERS” box when configuring a vmware source?
- Can I use “*” as a wildcard?
- What keys can I filter on? (I did look at https://github.com/ansible/ansible/blob/devel/contrib/inventory/vmware_inventory.ini and https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.vcenterhost.doc/GUID-2B6A1637-384D-4597-B453-B575F0ECD8A7.html but I wasn’t able to figure out how to apply that information…)
- In https://github.com/ansible/ansible/blob/13e89b17cc8ac3676837608270a88864ff4282cb/contrib/inventory/vmware_inventory.ini#L101 there’s something about reducing the data looked up to speed up inventory refreshes. How do I translate that into the variables textarea when configuring my vmware source?
- Same question as the last bullet for “skip_keys”.