userdata

package
v0.0.0-...-dacaf44 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MPL-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mount

type Mount []string

type User

type User struct {
	Name              string   `yaml:"name"`
	Sudo              string   `yaml:"sudo,omitempty"`
	Groups            string   `yaml:"groups,omitempty"`
	Home              string   `yaml:"home,omitempty"`
	Shell             string   `yaml:"shell,omitempty"`
	LockPasswd        *bool    `yaml:"lock_passwd,omitempty"`
	SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys,omitempty"`
}

type UserData

type UserData struct {
	HostName        string      `yaml:"hostname,omitempty"`
	Fqdn            string      `yaml:"fqdn,omitempty"`
	Users           []User      `yaml:"users,omitempty"`
	SSHPasswordAuth *bool       `yaml:"ssh_pwauth,omitempty"`
	DisableRoot     *bool       `yaml:"disable_root,omitempty"`
	PackageUpdate   *bool       `yaml:"package_update,omitempty"`
	FinalMessage    string      `yaml:"final_message,omitempty"`
	WriteFiles      []WriteFile `yaml:"write_files,omitempty"`
	RunCommands     []string    `yaml:"runcmd,omitempty"`
	// BootCommands are commands you want to run early on in the boot process. These should only
	// be used for commands that are need early on and running them via RunCommands is too late.
	BootCommands       []string `yaml:"bootcmd,omitempty"`
	Mounts             []Mount  `yaml:"mounts,omitempty"`
	MountDefaultFields Mount    `yaml:"mount_default_fields,omitempty,flow"`
}

func (*UserData) HasMountByMountPoint

func (u *UserData) HasMountByMountPoint(mountPoint string) bool

func (*UserData) HasMountByName

func (u *UserData) HasMountByName(deviceName string) bool

type WriteFile

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

Jump to

Keyboard shortcuts

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