package
0.0.0-20250312152250-ea85ec9d2454
Repository: https://github.com/snapcore/snapd.git
Documentation: pkg.go.dev
# Functions
ApplyFilesystemOnlyDefaults applies (via configcore.filesystemOnlyApply()) filesystem modifications under rootDir, according to the defaults.
CloudInitStatus returns the current status of cloud-init.
ConfigureTargetSystem configures the ubuntu-data partition with any configuration needed from e.g.
DisableCloudInit will disable cloud-init permanently by writing a cloud-init.disabled config file in etc/cloud under the target dir, which instructs cloud-init-generator to not trigger new cloud-init invocations.
HasGadgetCloudConf takes a gadget directory and returns whether there is cloud-init config in the form of a cloud.conf file in the gadget.
RestrictCloudInit will limit the operations of cloud-init on subsequent boots by either disabling cloud-init in the untriggered state, or restrict cloud-init to only use a specific datasource (additionally if the currently detected datasource for this boot was NoCloud, it will disable the automatic import of filesystems with labels such as CIDATA (or cidata) as datasources).
WritableDefaultsDir returns the full path of the joined subdir under the subtree for default content for system data living at rootdir, i.e.
# Constants
CloudInitDisabledPermanently is when cloud-init is disabled as per the cloud-init.disabled file.
CloudInitDone is when cloud-init has been run on this boot.
CloudInitEnabled is when cloud-init is active, but not necessarily finished.
CloudInitErrored is when cloud-init tried to run, but failed or had invalid configuration.
CloudInitNotFound is when there is no cloud-init executable on the device.
CloudInitRestrictedBySnapd is when cloud-init has been restricted by snapd with a specific config file.
CloudInitUntriggered is when cloud-init is disabled because nothing has triggered it to run, but it could still be run.
# Variables
ApplyFilesystemOnlyDefaultsImpl is initialized by init() of configcore.
# Structs
CloudInitRestrictionResult is the result of calling RestrictCloudInit.
CloudInitRestrictOptions are options for how to restrict cloud-init with RestrictCloudInit.
Options is the set of options used to configure the run system.
# Interfaces
Device carries information about the device model and mode that is relevant to sysconfig.
# Type aliases
CloudInitState represents the various cloud-init states.