Open c33s opened 1 week ago
The keyed_groups
, groups
and compose
inventory options are part of an upstream extension to the inventory plugin.
I recommend you to open this issue upstream at https://github.com/ansible/ansible https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html#constructed-features
That said, you might be able to do this using the additional groups
and compose
options:
https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins
SUMMARY
it would be quite handy to allow to group servers by multiple keys. especially handy for child-groups.
ISSUE TYPE
COMPONENT NAME
inventory plugin
ADDITIONAL INFORMATION
it would simply help to create more complex groups.
would create group
legacy_app
for all servers which are in the location ngb1, are debian based, have the label role with the key app and where the image ids are not in the ones specified.the dynamic functionality (matrix) could also be split into its own feature request, for now i put it here.
for the example we assume we have server types cx11 and ccx23 and the roles app, ingres and db would create:
nice would also be to allow to group even more complex.
syntax is far from optimal and thought through. it is just for descriping the feature in some way. maybe have a look at gitlab ci matrix syntax
creates: