diff --git a/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml b/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml index 9434b10f1d5..4613895202b 100644 --- a/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml +++ b/linux_os/guide/system/software/system-tools/package_rear_installed/rule.yml @@ -22,12 +22,9 @@ ocil_clause: 'the package is not installed' ocil: '{{{ ocil_package(package="rear") }}}' -# The package is not available for s309x on RHEL<8.5 -# platform: not_s390x_arch -{{%- if product in ["ol9", "rhel9"] %}} -platform: not_aarch64_arch -{{%- endif %}} +platforms: + - not ((s390x_arch and rhel_less_equal_8_4) or (rhel_greater_equal_9_0 and aarch64_arch) or (ol_greater_equal_9_0 and aarch64_arch)) template: name: package_installed diff --git a/shared/applicability/ol_greater_equal_9_0.yml b/shared/applicability/ol_greater_equal_9_0.yml new file mode 100644 index 00000000000..f05677ed31f --- /dev/null +++ b/shared/applicability/ol_greater_equal_9_0.yml @@ -0,0 +1,4 @@ +name: "cpe:/o:ol:ge:9:0" +title: "Operating System is OL and version is greater than or equal to 9.0" +check_id: ol9_greater_equal_9_0 +ansible_conditional: ansible_distribution == "OracleLinux" and ansible_distribution_version is version("9.0", ">=") diff --git a/shared/applicability/rhel_greater_equal_9_0.yml b/shared/applicability/rhel_greater_equal_9_0.yml new file mode 100644 index 00000000000..f1f1358c11e --- /dev/null +++ b/shared/applicability/rhel_greater_equal_9_0.yml @@ -0,0 +1,4 @@ +name: "cpe:/o:rhel:ge:9:0" +title: "Operating System is RHEL and version is greater than or equal to 9.0" +check_id: rhel9_greater_equal_9_0 +ansible_conditional: ansible_distribution == "RedHat" and ansible_distribution_version is version("9.0", ">=") diff --git a/shared/applicability/rhel_less_equal_8_4.yml b/shared/applicability/rhel_less_equal_8_4.yml new file mode 100644 index 00000000000..c3e61af8d2a --- /dev/null +++ b/shared/applicability/rhel_less_equal_8_4.yml @@ -0,0 +1,4 @@ +name: "cpe:/o:rhel:le:8:4" +title: "Operating System is RHEL and version is less than or equal to 8.4" +check_id: rhel8_less_equal_8_4 +ansible_conditional: ansible_distribution == "RedHat" and ansible_distribution_version is version("8.4", "<=") diff --git a/shared/checks/oval/installed_OS_is_ol.xml b/shared/checks/oval/installed_OS_is_ol.xml new file mode 100644 index 00000000000..c28af44affc --- /dev/null +++ b/shared/checks/oval/installed_OS_is_ol.xml @@ -0,0 +1,24 @@ + + + + {{{ oval_metadata("Installed OS is OL", affected_platforms=["multi_platform_all"]) }}} + + + + + + + + + + + /etc/os-release + ^ID=["']?(\w+)["']?$ + 1 + + + ol + + + diff --git a/shared/checks/oval/ol9_greater_equal_9_0.xml b/shared/checks/oval/ol9_greater_equal_9_0.xml new file mode 100644 index 00000000000..083d50e84fe --- /dev/null +++ b/shared/checks/oval/ol9_greater_equal_9_0.xml @@ -0,0 +1,26 @@ + + + + {{{ oval_metadata("ol version greater or equal to 9.0", affected_platforms=["multi_platform_all"]) }}} + + + + + + + + + + + + /etc/os-release + ^VERSION_ID=["']?([\d\.]+)["']?$ + 1 + + + 9.0 + + + diff --git a/shared/checks/oval/rhel8_less_equal_8_4.xml b/shared/checks/oval/rhel8_less_equal_8_4.xml new file mode 100644 index 00000000000..69c6cfc602f --- /dev/null +++ b/shared/checks/oval/rhel8_less_equal_8_4.xml @@ -0,0 +1,26 @@ + + + + {{{ oval_metadata("RHEL version less or equal to 8.4", affected_platforms=["multi_platform_all"]) }}} + + + + + + + + + + + + /etc/os-release + ^VERSION_ID=["']?([\d\.]+)["']?$ + 1 + + + 8.4 + + + diff --git a/shared/checks/oval/rhel9_greater_equal_9_0.xml b/shared/checks/oval/rhel9_greater_equal_9_0.xml new file mode 100644 index 00000000000..ac6f659d60a --- /dev/null +++ b/shared/checks/oval/rhel9_greater_equal_9_0.xml @@ -0,0 +1,26 @@ + + + + {{{ oval_metadata("RHEL version greater or equal to 9.0", affected_platforms=["multi_platform_all"]) }}} + + + + + + + + + + + + /etc/os-release + ^VERSION_ID=["']?([\d\.]+)["']?$ + 1 + + + 9.0 + + +