ansibleplaybook

package
v0.465.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WritePlaybook

func WritePlaybook(ctx context.Context, playbook *Playbook, path string) error

func WriteTemporaryMinimalPlaybookExecutingRoles

func WriteTemporaryMinimalPlaybookExecutingRoles(ctx context.Context, options *MinimalPlaybookOptions) (string, error)

Types

type Hosts

type Hosts []string

Custom type alias so we can implement the UnmarshalYaml

func (*Hosts) UnmarshalYAML

func (h *Hosts) UnmarshalYAML(value *yaml.Node) error

Custom UnmarshalYaml implementation for both strings and list of strings as hosts:

type MinimalPlaybookOptions

type MinimalPlaybookOptions struct {
	Hostname   string
	Roles      []string
	RemoteUser string
}

func (*MinimalPlaybookOptions) GetHostName

func (m *MinimalPlaybookOptions) GetHostName() (string, error)

type Play

type Play struct {
	Name       string   `yaml:"name"`
	Hosts      Hosts    `yaml:"hosts"`
	Roles      []string `yaml:"roles,omitempty"`
	RemoteUser string   `yaml:"remote_user,omitempty"`
}

type Playbook

type Playbook struct {
	Plays []*Play
}

func NewMinimalPlaybookExecutingRoles

func NewMinimalPlaybookExecutingRoles(ctx context.Context, options *MinimalPlaybookOptions) (*Playbook, error)

func ReadPlaybook

func ReadPlaybook(ctx context.Context, path string) (*Playbook, error)

Jump to

Keyboard shortcuts

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