playbook

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Name string `json:"name" yaml:"name"`

	Module string            `json:"module" yaml:"module"`
	Args   map[string]string `json:"args" yaml:"args"`
}

type PlayBook

type PlayBook struct {
	Name string `json:"name" yaml:"name"`

	Hosts []string `json:"hosts" yaml:"hosts"`

	Vars map[string]any `json:"vars" yaml:"vars"`

	RemoteUser string `json:"remote_user" yaml:"remote_user"`

	Sudo     bool   `json:"sudo" yaml:"sudo"`
	SudoUser string `json:"sudo_user" yaml:"sudo_user"`

	Tasks []*Task `json:"tasks" yaml:"tasks" yaml:"tasks"`

	Handlers []*Handler `json:"handlers" yaml:"handlers"`
}

func (*PlayBook) UnmarshalYAML

func (pb *PlayBook) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type Task

type Task struct {
	Name string `json:"name" yaml:"name"`

	Vars map[string]string `json:"vars" yaml:"vars"`

	Module string            `json:"module" yaml:"module"`
	Args   map[string]string `json:"args" yaml:"args"`

	RemoteUser string `json:"remote_user" yaml:"remote_user"`

	Sudo     bool   `json:"sudo" yaml:"sudo"`
	SudoUser string `json:"sudo_user" yaml:"sudo_user"`

	Hosts []string `json:"hosts" yaml:"hosts"`

	Notify []string `json:"notify" yaml:"notify"`
}

type YamlKV

type YamlKV map[string]interface{}

func (YamlKV) Apply

func (kv YamlKV) Apply(name string, to any) (bool, error)

func (YamlKV) ApplyArray

func (kv YamlKV) ApplyArray(name string, to any) (bool, error)

func (YamlKV) ApplyMap

func (kv YamlKV) ApplyMap(name string, to any) (bool, error)

func (YamlKV) GetRV

func (kv YamlKV) GetRV(name string) (reflect.Value, bool)

Jump to

Keyboard shortcuts

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