cloudinit

package
v0.0.0-...-1f313b5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstaller

func GetInstaller(bin registry.RegistryPlatformBinary, sha256 string) (string, error)

func InstallToDir

func InstallToDir(path_to, path_from, user, group string, dir_perm, file_perm int) []string

func MarshalCloudConfig

func MarshalCloudConfig(cc CloudConfig) (string, error)

Types

type CloudConfig

type CloudConfig struct {
	PackageUpdate bool        `yaml:"package_update"`
	Packages      []string    `yaml:"packages"`
	Users         []CloudUser `yaml:"users"`
	WriteFiles    []WriteFile `yaml:"write_files"`
	RunCmd        []string    `yaml:"runcmd"`
	Mounts        [][]string  `yaml:"mounts,omitempty"`
}

func BuildCloudConfig

func BuildCloudConfig(opts CloudConfigOpts) (*CloudConfig, error)

type CloudConfigOpts

type CloudConfigOpts struct {
	User           string
	Agent          registry.ResolvedAgent
	AuthorizedKeys []string
	ExtraPackages  []string
	ConfigData     string
	SecretsData    string
	ShareData      bool
}

type CloudUser

type CloudUser struct {
	Name           string   `yaml:"name"`
	Shell          string   `yaml:"shell"`
	HomeDir        string   `yaml:"homedir"`
	NoCreateHome   bool     `yaml:"no_create_home"`
	Groups         []string `yaml:"groups"`
	Sudo           []string `yaml:"sudo"`
	AuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`
	LockPasswd     bool     `yaml:"lock_passwd"`
}

type WriteFile

type WriteFile struct {
	Path        string `yaml:"path"`
	Permissions string `yaml:"permissions"`
	Owner       string `yaml:"owner"`
	Content     string `yaml:"content"`
}

Jump to

Keyboard shortcuts

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