在库存文件中定义此组时,是否可以定义具有排除模式的组?
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
像在 ansible 中,如何在剧本中指定排除主机集?
但我不想在每个剧本中定义组逻辑,我只想在 hosts 文件中定义一次