playbook

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//PlaybookSuffix - suffix for playbook folder
	PlaybookSuffix = "-playbook"
)

Variables

This section is empty.

Functions

func ConvertHosts

func ConvertHosts(
	clusterID string,
	sourceHosts map[string][]string,
) map[string][]*database.Host

func CopyFile

func CopyFile(src, dst string) (err error)

CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.

func GetComponents

func GetComponents(path string) []string

func GetFileFromDir

func GetFileFromDir(dir string, cf func(os.FileInfo) bool) (fs []os.FileInfo, err error)

func GetOrderedComponents

func GetOrderedComponents(dir string) ([]string, error)

func GetVersions

func GetVersions(path string) ([]string, error)

func InstantiateCluster

func InstantiateCluster(wd string, cluster *database.Cluster) error

func MkGroupVars

func MkGroupVars(oldFolder, newFolder string) error

func PreparePlaybooks

func PreparePlaybooks(dir string, ds *DeploySeed) error

Types

type Component

type Component struct {
	database.MetaComponent
	Inherent map[string]interface{}
	Hosts    map[string][]*database.Host
}

type DeploySeed

type DeploySeed map[string]*Component

func NewDeploySeed

func NewDeploySeed(c *database.Cluster, workDir string) *DeploySeed

func (*DeploySeed) AllHosts

func (ds *DeploySeed) AllHosts() map[string]*database.Host

type Template

type Template struct {
	Src  string `json:"-"`
	Dest string `json:"-"`
}

Template src is template path and dest is template output file

Jump to

Keyboard shortcuts

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