host_by_group: scope in cluster

This commit is contained in:
Mikaël Cluseau 2023-05-15 15:54:16 +02:00
parent 74abbf9eda
commit 482d3c83ba
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func clusterFuncs(clusterSpec *clustersconfig.Cluster) map[string]interface{} {
"hosts_by_group": func(group string) (hosts []interface{}) {
for _, host := range src.Hosts {
if host.Group == group {
if host.Cluster == cluster && host.Group == group {
hosts = append(hosts, asMap(host))
}
}