Inventory groups via API

Hello!

I can add groups and update the group variables via the API, but I’m not seeing how to set parent/child group relationships or add hosts to a group via the API.

awx cli doesn’t seem to have anything there either, although it used to apparently back in the tower-cli days.

My use case has a group being created for a site - “site_foo” that will need variables, a list of hosts, and then be set as child to one group - “region_bar” and parent to another group - “central_stuff”.

Any help is appreciated.

Thanks,
-ian

I wrote a role exactly for this purpose although it is based on parent child relationship

https://github.com/redhat-cop/tower_configuration/blob/devel/roles/groups/tasks/main.yml

https://github.com/redhat-cop/tower_configuration/blob/devel/roles/groups/README.md

Thanks - that will do perfect. Thank you!