Skip to content

Commit

Permalink
blueprint: add new kickstart.contents option
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-k committed May 21, 2024
1 parent fa0f365 commit e068cac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 9 additions & 1 deletion internal/blueprint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,15 @@ func Convert(bp Blueprint) iblueprint.Blueprint {
customizations.FIPS = fips
}
if installer := c.Installer; installer != nil {
iinst := iblueprint.InstallerCustomization(*installer)
iinst := iblueprint.InstallerCustomization{
Unattended: installer.Unattended,
SudoNopasswd: installer.SudoNopasswd,
}
if installer.Kickstart != nil {
iinst.Kickstart = &iblueprint.Kickstart{
Contents: installer.Kickstart.Contents,
}
}
customizations.Installer = &iinst
}
}
Expand Down
9 changes: 7 additions & 2 deletions internal/blueprint/installer_customizatios.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package blueprint

type InstallerCustomization struct {
Unattended bool `json:"unattended,omitempty" toml:"unattended,omitempty"`
SudoNopasswd []string `json:"sudo-nopasswd,omitempty" toml:"sudo-nopasswd,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"`
}

type Kickstart struct {
Contents string `json:"contents" toml:"contents"`
}

0 comments on commit e068cac

Please sign in to comment.