Help us shape the future of Go! Take the 2026 Go Developer Survey

ansible

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Vars     map[string]interface{} `yaml:",omitempty"`
	Hosts    map[string]Host        `yaml:",omitempty"`
	Children map[string]Group       `yaml:",omitempty"`
	// contains filtered or unexported fields
}

Group represents ansible group

func MakeGroup

func MakeGroup(name string) Group

MakeGroup instatiates an Group object

func (Group) AddChild

func (group Group) AddChild(newGroup Group) Group

AddChild adds a child group to the current group

func (Group) AddHost

func (group Group) AddHost(name string) Host

AddHost adds a host to the current group

type Host

type Host struct {
	Vars map[string]interface{} `yaml:",inline"`
	// contains filtered or unexported fields
}

Host represents ansible host

func MakeHost

func MakeHost(name string) Host

MakeHost instatiates an Host object

type Inventory

type Inventory struct {
	Groups map[string]Group `yaml:",inline,flow"`
}

Inventory contains parsed inventory representation

func MakeInventory

func MakeInventory() Inventory

MakeInventory instatiates an Inventory object

func UnmarshalYAML added in v0.4.0

func UnmarshalYAML(in []byte) (Inventory, error)

UnmarshalYAML deserializes into the Inventory object

func (Inventory) AddGroup

func (inv Inventory) AddGroup(name string) Group

AddGroup adds a group to the current inventory

func (*Inventory) MarshalYAML

func (inv *Inventory) MarshalYAML() ([]byte, error)

MarshalYAML serializes the Inventory object

Jump to

Keyboard shortcuts

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