diff --git a/cmd/dkl-dir2config/render-cluster.go b/cmd/dkl-dir2config/render-cluster.go index b273148..406dc68 100644 --- a/cmd/dkl-dir2config/render-cluster.go +++ b/cmd/dkl-dir2config/render-cluster.go @@ -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)) } }