diff --git a/pkg/config/config.go b/pkg/config/config.go index f808616..702d707 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -20,7 +20,10 @@ import ( "gopkg.in/yaml.v3" ) -const DefaultWebUIListenAddress = ":8080" +const ( + DefaultWebUIListenAddress = ":8080" + FilePrefix = "file://" +) type Install struct { Auto bool `yaml:"auto,omitempty"` @@ -53,11 +56,11 @@ type Config struct { type Bundles []Bundle type Bundle struct { - Repository string `yaml:"repository,omitempty"` - Rootfs string `yaml:"rootfs_path,omitempty"` - DB string `yaml:"db_path,omitempty"` - - Targets []string `yaml:"targets,omitempty"` + Repository string `yaml:"repository,omitempty"` + Rootfs string `yaml:"rootfs_path,omitempty"` + DB string `yaml:"db_path,omitempty"` + LocalFile bool `yaml:"local_file,omitempty"` + Targets []string `yaml:"targets,omitempty"` } const DefaultHeader = "#cloud-config" @@ -84,6 +87,9 @@ func (b Bundles) Options() (res [][]bundles.BundleOption) { if bundle.DB != "" { opts = append(opts, bundles.WithDBPath(bundle.DB)) } + if bundle.LocalFile { + opts = append(opts, bundles.WithLocalFile(true)) + } res = append(res, opts) } }