MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / matchesBootstrapLimit

Function matchesBootstrapLimit

internal/ui/plugins/ansible/plugin.go:1944–1972  ·  view source on GitHub ↗
(host coreansible.InventoryHost, rawLimit string)

Source from the content-addressed store, hash-verified

1942}
1943
1944func matchesBootstrapLimit(host coreansible.InventoryHost, rawLimit string) bool {
1945 limit := strings.TrimSpace(rawLimit)
1946 if limit == "" || strings.EqualFold(limit, bootstrapScopeAll) {
1947 return true
1948 }
1949
1950 parts := strings.Split(limit, ",")
1951 for _, part := range parts {
1952 token := strings.TrimSpace(part)
1953 if token == "" {
1954 continue
1955 }
1956 if token == host.Alias {
1957 return true
1958 }
1959 for _, group := range host.GroupNames {
1960 if token == group {
1961 return true
1962 }
1963 }
1964 if strings.ContainsAny(token, "*?[]") {
1965 if ok, _ := filepath.Match(token, host.Alias); ok {
1966 return true
1967 }
1968 }
1969 }
1970
1971 return false
1972}
1973
1974func formatDirectBootstrapReport(results []directBootstrapResult, dryRun bool) string {
1975 var b strings.Builder

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected