X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=cmd%2Fsafcm%2Fsync_sync.go;h=8b4cec45d0ba837cc490ac332a9b5d124883c136;hp=1328af7ca7acf6d87073c12cc8b71d36ca489e44;hb=20686d0d25d7d22f577fc80df31c192b6a88d318;hpb=4ce09b6e6f7056883af10c3207aed6866657f9f9 diff --git a/cmd/safcm/sync_sync.go b/cmd/safcm/sync_sync.go index 1328af7..8b4cec4 100644 --- a/cmd/safcm/sync_sync.go +++ b/cmd/safcm/sync_sync.go @@ -19,6 +19,7 @@ package main import ( "fmt" + "math" "os" "path/filepath" "sort" @@ -188,10 +189,10 @@ func (s *Sync) resolveHostGroups(detectedGroups []string) ( // Early entries have higher priorities groupPriority := make(map[string]int) for i, x := range s.config.GroupOrder { - groupPriority[x] = i + 1 + groupPriority[x] = math.MinInt32 + i + 1 } // Host itself always has highest priority - groupPriority[s.host.Name] = -1 + groupPriority[s.host.Name] = math.MinInt32 // Sort groups after priority and name sort.Slice(groups, func(i, j int) bool {