ansible

package
v0.0.0-...-f136377 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PlaybookRunnerProg = "ansible-playbook"

Variables

This section is empty.

Functions

This section is empty.

Types

type ParametersBuilder

type ParametersBuilder interface {
	BuildCustomParameters(customParams config.ClusterParams, pathToBuild string) string
	RenderTemplate(pathToScript string, pathToEnvironmentFile string, pathToCustomEnvFile string, ctx *context.InfraContext) string
	OverrideParametersWithCustoms(awsCredentials config.AwsSettings)
	ParseDefaultEnvFile(pathToEnvironmentFile string)
}

type PlayBookResults

type PlayBookResults struct {
	User             string
	Password         string
	ApiServer        string
	KubeConfigPath   string
	AdditionalFields map[string]string
}

type Playbook

type Playbook struct {
	// Name of playbook
	Name string
	//Path to Playbook
	Path                   string
	OverrideParametersPath string
	RenderedTemplatePath   string
	OutputLocation         string
}

func (Playbook) BuildCustomParameters

func (playbook Playbook) BuildCustomParameters(customParams config.ClusterParams, pathToBuild string) string

BuildCustomParameters This Function gets the input customParams , and set them as environment variables , and make an environment file , which each pair prefixed by "export" keyword.

func (Playbook) OverrideParametersWithCustoms

func (playbook Playbook) OverrideParametersWithCustoms(awsCredentials config.AwsSettings)

func (Playbook) ParseDefaultEnvFile

func (playbook Playbook) ParseDefaultEnvFile(pathToEnvironmentFile string)

ParseDefaultEnvFile This function parse (key,value) pairs from environment file prefixed with "export", in order to set them as environment variables in this application, and not only in script.

func (*Playbook) RenderTemplate

func (playbook *Playbook) RenderTemplate(pathToScript string, pathToEnvironmentFile string, pathToCustomEnvFile string, ctx *context.InfraContext)

func (Playbook) Run

func (playbook Playbook) Run(infraCtx *context.InfraContext) PlayBookResults

type PlaybookRunner

type PlaybookRunner interface {
	Run(*context.InfraContext) PlayBookResults
}

Jump to

Keyboard shortcuts

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