X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=cmd%2Fsafcm%2Fconfig%2Fgroups.go;h=a1dd83a0164267a0f24a351a74966fd108300323;hp=5f3f679f5a9bde9ec1368d3f705f08d313647094;hb=5d6cc7f14a4bacc36bf3a23cd735a75ad4a90f1d;hpb=d56dba0752e6b7d2dcac2c0d0e2e3ccddf80cd2a diff --git a/cmd/safcm/config/groups.go b/cmd/safcm/config/groups.go index 5f3f679..a1dd83a 100644 --- a/cmd/safcm/config/groups.go +++ b/cmd/safcm/config/groups.go @@ -34,7 +34,7 @@ const ( GroupRemoveSuffix = GroupSpecialSeparator + "remove" ) -// Keep in sync with sync_info.go:infoGroupDetectedRegexp +// Keep in sync with cmd/safcm/sync_info.go:infoGroupDetectedRegexp var groupNameRegexp = regexp.MustCompile(`^[a-z0-9_-]+$`) func LoadGroups(cfg *Config, hosts *Hosts) (map[string][]string, error) { @@ -86,6 +86,8 @@ func LoadGroups(cfg *Config, hosts *Hosts) (map[string][]string, error) { if x == GroupAll { continue } + // Don't validate against groupNameRegexp because + // hosts have less strict restrictions. if strings.Contains(x, GroupSpecialSeparator) { return nil, fmt.Errorf( "%s member %q must not contain %q",