cloudinit

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBehaviour

type AddBehaviour int
const (
	Always AddBehaviour = iota
	Once
)

type CloudConfig

type CloudConfig struct {
	PackageUpdate bool `json:"package_update"`

	Packages     []string           `json:"packages,omitempty"`
	RunCommmands [][]string         `json:"runcmd,omitempty"`
	WriteFiles   []*CloudConfigFile `json:"write_files,omitempty"`
}

type CloudConfigFile

type CloudConfigFile struct {
	Encoding    string `json:"encoding,omitempty"`
	Owner       string `json:"owner,omitempty"`
	Path        string `json:"path,omitempty"`
	Permissions string `json:"permissions,omitempty"`
	Content     string `json:"content,omitempty"`
}

type CloudInitTarget

type CloudInitTarget struct {
	Config *CloudConfig
	// contains filtered or unexported fields
}

func NewCloudInitTarget

func NewCloudInitTarget(out io.Writer) *CloudInitTarget

func (*CloudInitTarget) AddCommand

func (t *CloudInitTarget) AddCommand(addBehaviour AddBehaviour, args ...string)

func (*CloudInitTarget) AddDownloadCommand

func (t *CloudInitTarget) AddDownloadCommand(addBehaviour AddBehaviour, url string, dest string)

func (*CloudInitTarget) AddMkdirpCommand

func (t *CloudInitTarget) AddMkdirpCommand(p string, dirMode os.FileMode)

func (*CloudInitTarget) Chown

func (t *CloudInitTarget) Chown(path string, user, group string)

func (*CloudInitTarget) Finish

func (t *CloudInitTarget) Finish(taskMap map[string]fi.Task) error

func (*CloudInitTarget) ProcessDeletions added in v1.10.0

func (t *CloudInitTarget) ProcessDeletions() bool

func (*CloudInitTarget) WriteFile

func (t *CloudInitTarget) WriteFile(destPath string, contents fi.Resource, fileMode os.FileMode, dirMode os.FileMode) error

Jump to

Keyboard shortcuts

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