ansibleplaybook

package
v0.463.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 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, hostname string, roles []string) (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 Play

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

type Playbook

type Playbook struct {
	Plays []*Play
}

func NewMinimalPlaybookExecutingRoles

func NewMinimalPlaybookExecutingRoles(ctx context.Context, hostname string, roles []string) (*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