Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTaskResult

func GetTaskResult[T any](playOutput PlayOutput, play int, task int) (T, error)

func RunPlaybook

func RunPlaybook(ctx context.Context, connection *types.Connection, playbook []byte) ([]byte, error)

Types

type Play

type Play struct {
	GatherFacts bool
	Become      bool
	Check       bool
	Tasks       []any
}

type PlayOutput

type PlayOutput struct {
	CustomStats       map[string]any             `json:"custom_stats"`
	GlobalCustomStats map[string]any             `json:"global_custom_stats"`
	Results           []PlayOutputResult         `json:"plays"`
	Stats             map[string]PlayOutputStats `json:"stats"`
}

func RunPlay

func RunPlay(ctx context.Context, connection *types.Connection, plays ...Play) (PlayOutput, error)

type PlayOutputItemMetadata

type PlayOutputItemMetadata struct {
	Duration PlayOutputItemMetadataDuration `json:"duration"`
	Id       string                         `json:"id"`
	Name     string                         `json:"name"`
	Path     string                         `json:"path"`
}

type PlayOutputItemMetadataDuration

type PlayOutputItemMetadataDuration struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

type PlayOutputResult

type PlayOutputResult struct {
	Play  PlayOutputItemMetadata `json:"play"`
	Tasks []PlayOutputTask       `json:"tasks"`
}

type PlayOutputStats

type PlayOutputStats struct {
	Changed     uint `json:"changed"`
	Failures    uint `json:"failures"`
	Ignored     uint `json:"ignored"`
	Ok          uint `json:"ok"`
	Rescued     uint `json:"rescued"`
	Skipped     uint `json:"skipped"`
	Unreachable uint `json:"unreachable"`
}

type PlayOutputTask

type PlayOutputTask struct {
	Hosts map[string]any         `json:"hosts"`
	Task  PlayOutputItemMetadata `json:"task"`
}

Jump to

Keyboard shortcuts

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