I want make an inventory file for Ansible as sorting-independent. There is an example below for this file:
[houston:children]
hst-lin
hst-win
[hst-lin:children]
hst-lin-prod
hst-lin-test
[hst-win:children]
hst-win-prod
hst-win-test
[lin:children]
lin-hst
lin-ny
[lin-hst:children]
lin-hst-prod
lin-hst-test
.
.
.
Thus the user can type "lin-hst" or "hst-lin" to access to Linux servers those at Houston. My main purpose is this. But there is a problem at this point. I have 4 binary variable (location, os, prod/test, int/ext) and there are too many combination for typing sorting-independent. I want to "hst-lin-int-test" be same with "lin-hst-test-int".
Is there an easy way in Ansible (or YAML) to do this or should I type every combination of these variable? I'm looking for intersection cluster or something like that.