ansible

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnsibleCommand `ansible` command
	AnsibleCommand = "ansible"
	// AnsibleInventoryCommand `ansible-inventory` command
	AnsibleInventoryCommand = "ansible-inventory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostGroup

type HostGroup struct {
	Children []string `json:"children"`
	Hosts    []string `json:"hosts"`
}

HostGroup Host and groups of a group `ansible-inventory` JSON sub-structure

type InventoryList

type InventoryList map[string]HostGroup

InventoryList Basic `ansible-inventory` JSON output structure

func Parse

func Parse(in []byte) (*InventoryList, error)

Parse raw JSON into

func (*InventoryList) GetHostsForGroup

func (inv *InventoryList) GetHostsForGroup(group string) []string

GetHostsForGroup return resolved list of hosts for a given group name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL