manifest: support RHSM facts in OSCustomizations
Add the RHSM fact to the OSCustomizations and add the stage to the OS pipeline if the value is set.
This commit is contained in:
parent
4bd2c0cb1d
commit
3cff4d0c1d
1 changed files with 9 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ type OSCustomizations struct {
|
|||
WAAgentConfig *osbuild.WAAgentConfStageOptions
|
||||
UdevRules *osbuild.UdevRulesStageOptions
|
||||
LeapSecTZ *string
|
||||
FactAPIType string
|
||||
|
||||
Subscription *distro.SubscriptionImageOptions
|
||||
RHSMConfig map[distro.RHSMSubscriptionStatus]*osbuild.RHSMStageOptions
|
||||
|
|
@ -521,6 +522,14 @@ func (p *OS) serialize() osbuild.Pipeline {
|
|||
pipeline.AddStage(osbuild.NewOscapRemediationStage(p.OpenSCAPConfig))
|
||||
}
|
||||
|
||||
if p.FactAPIType != "" {
|
||||
pipeline.AddStage(osbuild.NewRHSMFactsStage(&osbuild.RHSMFactsStageOptions{
|
||||
Facts: osbuild.RHSMFacts{
|
||||
ApiType: p.FactAPIType,
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
if p.SElinux != "" {
|
||||
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
|
||||
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue