Is it possible to define a group with an exclusion pattern, when defining this group in an inventory file?
group1:
hosts:
xxx-[1:100]:
group2:
hosts:
xxx-2:
xxx-37:
# This should contain the hosts from group1 without the hosts from group2
group3:
# Throws an error: "Invalid characters were found in group names but not replaced"
children: group1,!group2
Like in In ansible, how do I specify an exclusion set of hosts in a playbook?
But I don't want to define the group logic in each playbook, I want to define it only once in the hosts file