internal

package
v0.0.0-...-c6ac05f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LineinfileMod = "lineinfile"
)

Variables

This section is empty.

Functions

func NewSSHService

func NewSSHService() *sshService

func NewSshConn

func NewSshConn(host, user, pw, pkey string, port int) *sshConn

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(playbookPath string, hostPath string) *Engine

func (*Engine) FreeStrategy

func (e *Engine) FreeStrategy(respObj PlayDoc)

func (*Engine) LinearStrategy

func (e *Engine) LinearStrategy(respObj PlayDoc)

func (*Engine) Run

func (e *Engine) Run()

type ExecOutput

type ExecOutput struct {
	Cmd string
	Out string
	Err string
}

type Host

type Host struct {
	SshHost string `yaml:"ansible_host"`
	SshUser string `yaml:"ansible_user"`
	SshPass string `yaml:"ansible_ssh_pass"`
	SshPort int    `yaml:"ansible_ssh_port"`
}

type Inventory

type Inventory struct {
	All struct {
		Hosts    map[string]Host `yaml:"hosts"`
		Children map[string]struct {
			Hosts map[string]struct{} `yaml:"hosts"`
		} `yaml:"children"`
	} `yaml:"all"`
}

type InventoryOpts

type InventoryOpts func(inv *MainInventory)

func InventoryPathOptions

func InventoryPathOptions(path string) InventoryOpts

type MainInventory

type MainInventory struct {
	// contains filtered or unexported fields
}

func NewInventory

func NewInventory(invOpts ...InventoryOpts) *MainInventory

func (*MainInventory) Validate

func (mv *MainInventory) Validate()

type Play

type Play struct {
	Name     string                   `yaml:"name"`
	Hosts    string                   `yaml:"hosts"`
	Tasks    []map[string]interface{} `yaml:"tasks"`
	Strategy string                   `yaml:"strategy"`
	Serial   int                      `yaml:"serial"`
}

type PlayBook

type PlayBook struct {
	Plays []Play
}

func NewPlaybook

func NewPlaybook(playbookPath string) *PlayBook

func (*PlayBook) Generate

func (pb *PlayBook) Generate(index int) PlayDoc

type PlayDoc

type PlayDoc struct {
	// contains filtered or unexported fields
}

type Task

type Task struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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