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

Function NormalizeInventoryStyle

internal/plugins/ansible/inventory.go:337–346  ·  view source on GitHub ↗

NormalizeInventoryStyle validates and canonicalizes inventory style.

(style string)

Source from the content-addressed store, hash-verified

335
336// NormalizeInventoryStyle validates and canonicalizes inventory style.
337func NormalizeInventoryStyle(style string) string {
338 switch strings.ToLower(strings.TrimSpace(style)) {
339 case InventoryStyleExpanded:
340 return InventoryStyleExpanded
341 case InventoryStyleCompact:
342 return InventoryStyleCompact
343 default:
344 return InventoryStyleCompact
345 }
346}
347
348func renderINIInventory(groups map[string][]InventoryHost, allHosts []InventoryHost, style string) string {
349 orderedGroups := make([]string, 0, len(groups))

Callers 2

BuildInventoryWithFormatFunction · 0.85

Calls

no outgoing calls

Tested by 1