blueprint: enable the anaconda modules customization
This has been available since v0.74.0 of osbuild/images but was never connected to the frontend blueprint. See https://github.com/osbuild/images/pull/799
This commit is contained in:
parent
fb7a2aab96
commit
654a6ad8f5
3 changed files with 33 additions and 3 deletions
|
|
@ -355,6 +355,12 @@ func Convert(bp Blueprint) iblueprint.Blueprint {
|
|||
Contents: installer.Kickstart.Contents,
|
||||
}
|
||||
}
|
||||
if installer.Modules != nil {
|
||||
iinst.Modules = &iblueprint.AnacondaModules{
|
||||
Enable: installer.Modules.Enable,
|
||||
Disable: installer.Modules.Disable,
|
||||
}
|
||||
}
|
||||
customizations.Installer = &iinst
|
||||
}
|
||||
if rpm := c.RPM; rpm != nil && rpm.ImportKeys != nil {
|
||||
|
|
|
|||
|
|
@ -173,6 +173,15 @@ func TestConvert(t *testing.T) {
|
|||
Installer: &InstallerCustomization{
|
||||
Unattended: true,
|
||||
SudoNopasswd: []string{"%group", "user"},
|
||||
Modules: &AnacondaModules{
|
||||
Enable: []string{
|
||||
"org.fedoraproject.Anaconda.Modules.Localization",
|
||||
"org.fedoraproject.Anaconda.Modules.Users",
|
||||
},
|
||||
Disable: []string{
|
||||
"org.fedoraproject.Anaconda.Modules.Network",
|
||||
},
|
||||
},
|
||||
},
|
||||
RPM: &RPMCustomization{
|
||||
ImportKeys: &RPMImportKeys{
|
||||
|
|
@ -351,6 +360,15 @@ func TestConvert(t *testing.T) {
|
|||
Installer: &iblueprint.InstallerCustomization{
|
||||
Unattended: true,
|
||||
SudoNopasswd: []string{"%group", "user"},
|
||||
Modules: &iblueprint.AnacondaModules{
|
||||
Enable: []string{
|
||||
"org.fedoraproject.Anaconda.Modules.Localization",
|
||||
"org.fedoraproject.Anaconda.Modules.Users",
|
||||
},
|
||||
Disable: []string{
|
||||
"org.fedoraproject.Anaconda.Modules.Network",
|
||||
},
|
||||
},
|
||||
},
|
||||
RPM: &iblueprint.RPMCustomization{
|
||||
ImportKeys: &iblueprint.RPMImportKeys{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package blueprint
|
||||
|
||||
type InstallerCustomization struct {
|
||||
Unattended bool `json:"unattended,omitempty" toml:"unattended,omitempty"`
|
||||
SudoNopasswd []string `json:"sudo-nopasswd,omitempty" toml:"sudo-nopasswd,omitempty"`
|
||||
Kickstart *Kickstart `json:"kickstart,omitempty" toml:"kickstart,omitempty"`
|
||||
Unattended bool `json:"unattended,omitempty" toml:"unattended,omitempty"`
|
||||
SudoNopasswd []string `json:"sudo-nopasswd,omitempty" toml:"sudo-nopasswd,omitempty"`
|
||||
Kickstart *Kickstart `json:"kickstart,omitempty" toml:"kickstart,omitempty"`
|
||||
Modules *AnacondaModules `json:"modules,omitempty" toml:"modules,omitempty"`
|
||||
}
|
||||
|
||||
type Kickstart struct {
|
||||
Contents string `json:"contents" toml:"contents"`
|
||||
}
|
||||
|
||||
type AnacondaModules struct {
|
||||
Enable []string `json:"enable,omitempty" toml:"enable,omitempty"`
|
||||
Disable []string `json:"disable,omitempty" toml:"disable,omitempty"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue