vmware inventory group by tags

Hi,

I use awx to manage vmware instances.
I want to use vmware tags to group my instances.
I’m able to generate an inventory with instances in tag groups with the following command :
ansible-inventory -i ./tag_vmware.yml --list

tag_vmware.yml contains the following

The vmware inventory source type supports groupby patterns in the API. The allowed grouping keys are not maintained, and because of that, the UI does not expose this IIRC.

In your case, you probably want to create a vmware inventory source. Then go to the API details page /api/v2/inventory_sources/N/, for the thing you just created. Then do the most obvious thing - PATCH providing {“group_by”: “tag”} or {“group_by”: “tags”}. I’m not sure what the key in hostvars is, so I don’t want to tell you the wrong thing. This will set the “groupby_patterns” option in the config file for the inventory script.

AWX will soon start using the plugin (more similar to how you’re doing it locally), and deprecate the script. But when that gets written, the group_by functionality will be preserved, just writing these same options in a different format.

Hello, I have the exact same problem today. Did you find a solution? cordially