inventory

package
v0.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildrenGroup

type ChildrenGroup struct {
	Hosts map[string]Vars `yaml:"hosts"`
	Vars  Vars            `yaml:"vars"`
}

type HostInventory

type HostInventory struct {
	Hosts    map[string]Vars          `yaml:"hosts"`
	Children map[string]ChildrenGroup `yaml:"children"`
	Vars     Vars                     `yaml:"vars"`
}

type Inventory

type Inventory struct {
	All HostInventory `yaml:"all"`
}

func NewInventory

func NewInventory(filePath string, password string) (inventory Inventory, err error)

func (*Inventory) EditInventory

func (inventory *Inventory) EditInventory(filePath string, password string) (err error)

func (*Inventory) GetAccessInformation

func (inventory *Inventory) GetAccessInformation(group string, host string) (username string, password string, sshkey string, sshagent bool, address string, err error)

func (*Inventory) GetAddress

func (inventory *Inventory) GetAddress(group string, host string) (string, error)

func (*Inventory) GetGroupHosts

func (inventory *Inventory) GetGroupHosts(group string) (groupHosts []string)

func (*Inventory) GetGroups

func (inventory *Inventory) GetGroups() (groups []string)

func (*Inventory) GetPassword

func (inventory *Inventory) GetPassword(group string, host string) (string, error)

func (*Inventory) GetSshAgent

func (inventory *Inventory) GetSshAgent(group string, host string) (bool, error)

func (*Inventory) GetSshKey

func (inventory *Inventory) GetSshKey(group string, host string) (string, error)

func (*Inventory) GetUngroupedHosts

func (inventory *Inventory) GetUngroupedHosts() (ungroupedHosts []string)

func (*Inventory) GetUsername

func (inventory *Inventory) GetUsername(group string, host string) (string, error)

type Vars

type Vars struct {
	Username       string `yaml:"username,omitempty"`
	AnsibleUser    string `yaml:"ansible_user,omitempty"`
	Password       string `yaml:"password,omitempty"`
	AnsibleSshPASS string `yaml:"ansible_ssh_pass,omitempty"`
	SshKey         string `yaml:"sshkey,omitempty"`
	Address        string `yaml:"address,omitempty"`
	AnsibleHost    string `yaml:"ansible_host,omitempty"`
	SshAgent       bool   `yaml:"sshagent,omitempty"`
}

Jump to

Keyboard shortcuts

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