diff --git a/pkg/cluster/ansible/import.go b/pkg/cluster/ansible/import.go index a1101138c9..e6ead6966d 100644 --- a/pkg/cluster/ansible/import.go +++ b/pkg/cluster/ansible/import.go @@ -185,7 +185,7 @@ func diffConfigs(configs []map[string]interface{}) (global map[string]interface{ func CommentConfig(clsName string) error { dir := spec.ClusterPath(clsName, spec.AnsibleImportedConfigPath) err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { - if err != nil || info.IsDir() && !strings.HasSuffix(info.Name(), ".toml") { + if err != nil || info.IsDir() || !strings.HasSuffix(info.Name(), ".toml") { return nil }