blueprint: add installer customizations
This commit is contained in:
parent
535ff2ef2d
commit
bd57d95e49
4 changed files with 19 additions and 0 deletions
|
|
@ -351,6 +351,10 @@ func Convert(bp Blueprint) iblueprint.Blueprint {
|
|||
if fips := c.FIPS; fips != nil {
|
||||
customizations.FIPS = fips
|
||||
}
|
||||
if installer := c.Installer; installer != nil {
|
||||
iinst := iblueprint.InstallerCustomization(*installer)
|
||||
customizations.Installer = &iinst
|
||||
}
|
||||
}
|
||||
|
||||
ibp := iblueprint.Blueprint{
|
||||
|
|
|
|||
|
|
@ -170,6 +170,10 @@ func TestConvert(t *testing.T) {
|
|||
Filename: "repofile",
|
||||
},
|
||||
},
|
||||
Installer: &InstallerCustomization{
|
||||
Unattended: true,
|
||||
SudoNopasswd: []string{"%group", "user"},
|
||||
},
|
||||
},
|
||||
Distro: "distro",
|
||||
},
|
||||
|
|
@ -321,6 +325,10 @@ func TestConvert(t *testing.T) {
|
|||
Filename: "repofile",
|
||||
},
|
||||
},
|
||||
Installer: &iblueprint.InstallerCustomization{
|
||||
Unattended: true,
|
||||
SudoNopasswd: []string{"%group", "user"},
|
||||
},
|
||||
},
|
||||
Distro: "distro",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ type Customizations struct {
|
|||
Files []FileCustomization `json:"files,omitempty" toml:"files,omitempty"`
|
||||
Repositories []RepositoryCustomization `json:"repositories,omitempty" toml:"repositories,omitempty"`
|
||||
FIPS *bool `json:"fips,omitempty" toml:"fips,omitempty"`
|
||||
Installer *InstallerCustomization `json:"installer,omitempty" toml:"installer,omitempty"`
|
||||
}
|
||||
|
||||
type IgnitionCustomization struct {
|
||||
|
|
|
|||
6
internal/blueprint/installer_customizatios.go
Normal file
6
internal/blueprint/installer_customizatios.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package blueprint
|
||||
|
||||
type InstallerCustomization struct {
|
||||
Unattended bool `json:"unattended,omitempty" toml:"unattended,omitempty"`
|
||||
SudoNopasswd []string `json:"sudo-nopasswd,omitempty" toml:"sudo-nopasswd,omitempty"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue