inventory

package
v0.0.0-...-5dcfad9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(inventoryFile string) error

Parse inventory file.

Types

type Host

type Host struct {
	Alias      string
	Host       string
	Port       int
	User       string
	Password   string
	Keys       []string
	Passphrase string
}

Host target host.

func DeDuplHosts

func DeDuplHosts(hosts []*Host) []*Host

DeDuplHosts deduplicate the hosts.

func GetAllHosts

func GetAllHosts() []*Host

GetAllHosts that from inventory file.

func GetHostByAlias

func GetHostByAlias(hostAlias string) *Host

GetHostByAlias get host by its alias name(the first field).

func GetHostsByGroup

func GetHostsByGroup(groupName string) []*Host

GetHostsByGroup get hosts by host group name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳