distro/rhel8: enable oscap for centos8
Remediations for centos 8 images were not previously enabled. This commit enables running oscap remediations for centos 8.
This commit is contained in:
parent
962ad9e582
commit
c32fac7169
1 changed files with 2 additions and 2 deletions
|
|
@ -373,8 +373,8 @@ func (t *imageType) checkOptions(bp *blueprint.Blueprint, options distro.ImageOp
|
||||||
}
|
}
|
||||||
|
|
||||||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||||
// only add support for RHEL 8.7 and above. centos not supported.
|
// only add support for RHEL 8.7 and above.
|
||||||
if !t.arch.distro.isRHEL() || common.VersionLessThan(t.arch.distro.osVersion, "8.7") {
|
if common.VersionLessThan(t.arch.distro.osVersion, "8.7") {
|
||||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported os version: %s", t.arch.distro.osVersion))
|
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported os version: %s", t.arch.distro.osVersion))
|
||||||
}
|
}
|
||||||
supported := oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList)
|
supported := oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue