From b779c5ccd9b7c68f156db544044da029f0fc23ab Mon Sep 17 00:00:00 2001 From: svet-se Date: Fri, 29 May 2026 14:37:10 +0300 Subject: [PATCH 1/2] fix system with kernel for sle --- shared/applicability/oval/system_with_kernel.xml | 2 ++ shared/applicability/system_with_kernel.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shared/applicability/oval/system_with_kernel.xml b/shared/applicability/oval/system_with_kernel.xml index d1cbf79c4d20..02334021d086 100644 --- a/shared/applicability/oval/system_with_kernel.xml +++ b/shared/applicability/oval/system_with_kernel.xml @@ -8,6 +8,7 @@ {{% endif %}} {{% if 'sle' in product or 'slmicro' in product %}} + {{% endif %}} @@ -16,6 +17,7 @@ {{% elif 'sle' in product or 'slmicro' in product %}} {{{ oval_test_package_installed(package="kernel-default", test_id="inventory_test_kernel_installed") }}} {{{ oval_test_package_installed(package="kernel-default-base", test_id="inventory_test_kernel_default_base_installed") }}} +{{{ oval_test_package_installed(package="kernel-azure", test_id="inventory_test_kernel_azure_installed") }}} {{% else %}} {{{ oval_test_package_installed(package="kernel-core", test_id="inventory_test_kernel_installed") }}} {{% endif %}} diff --git a/shared/applicability/system_with_kernel.yml b/shared/applicability/system_with_kernel.yml index 07793b1a1a2f..6fc40ad9c8e3 100644 --- a/shared/applicability/system_with_kernel.yml +++ b/shared/applicability/system_with_kernel.yml @@ -17,7 +17,7 @@ title: Bare-metal systems, virtual machines, bootc container images, running boo check_id: system_with_kernel {{% if pkg_system == "rpm" %}} {{% if "sle" in product or "slmicro" in product %}} -bash_conditional: "rpm --quiet -q kernel-default || rpm --quiet -q kernel-default-base" +bash_conditional: "rpm --quiet -q kernel-default || rpm --quiet -q kernel-default-base || rpm --quiet -q kernel-azure" {{% elif "ol" in families %}} bash_conditional: "rpm --quiet -q kernel || rpm --quiet -q kernel-uek" {{% elif product == "fedora" or "rhel" in product %}} @@ -35,7 +35,7 @@ bash_conditional: "dpkg-query --show --showformat='${db:Status-Status}' 'kernel' {{% if "debian" in product or "ubuntu" in product %}} ansible_conditional: '"linux-base" in ansible_facts.packages' {{% elif "sle" in product or "slmicro" in product %}} -ansible_conditional: '("kernel-default" in ansible_facts.packages or "kernel-default-base" in ansible_facts.packages)' +ansible_conditional: '("kernel-default" in ansible_facts.packages or "kernel-default-base" in ansible_facts.packages or "kernel-azure" in ansible_facts.packages)' {{% elif "ol" in families %}} ansible_conditional: '("kernel" in ansible_facts.packages or "kernel-uek" in ansible_facts.packages)' {{% elif product == "fedora" or "rhel" in product %}} From ebb570ceb9969184cb34e24542934f2af66385dc Mon Sep 17 00:00:00 2001 From: svet-se Date: Fri, 29 May 2026 15:01:07 +0300 Subject: [PATCH 2/2] fix yamllint line too long --- shared/applicability/system_with_kernel.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/shared/applicability/system_with_kernel.yml b/shared/applicability/system_with_kernel.yml index 6fc40ad9c8e3..59bd1836d8a6 100644 --- a/shared/applicability/system_with_kernel.yml +++ b/shared/applicability/system_with_kernel.yml @@ -17,7 +17,10 @@ title: Bare-metal systems, virtual machines, bootc container images, running boo check_id: system_with_kernel {{% if pkg_system == "rpm" %}} {{% if "sle" in product or "slmicro" in product %}} -bash_conditional: "rpm --quiet -q kernel-default || rpm --quiet -q kernel-default-base || rpm --quiet -q kernel-azure" +bash_conditional: >- + rpm --quiet -q kernel-default || + rpm --quiet -q kernel-default-base || + rpm --quiet -q kernel-azure {{% elif "ol" in families %}} bash_conditional: "rpm --quiet -q kernel || rpm --quiet -q kernel-uek" {{% elif product == "fedora" or "rhel" in product %}} @@ -27,15 +30,22 @@ bash_conditional: "rpm --quiet -q kernel" {{% endif %}} {{% else %}} {{% if "debian" in product or "ubuntu" in product %}} -bash_conditional: "dpkg-query --show --showformat='${db:Status-Status}' 'linux-base' 2>/dev/null | grep -q '^installed$'" +bash_conditional: >- + dpkg-query --show --showformat='${db:Status-Status}' 'linux-base' 2>/dev/null | + grep -q '^installed$' {{% else %}} -bash_conditional: "dpkg-query --show --showformat='${db:Status-Status}' 'kernel' 2>/dev/null | grep -q '^installed$'" +bash_conditional: >- + dpkg-query --show --showformat='${db:Status-Status}' 'kernel' 2>/dev/null | + grep -q '^installed$' {{% endif %}} {{% endif %}} {{% if "debian" in product or "ubuntu" in product %}} ansible_conditional: '"linux-base" in ansible_facts.packages' {{% elif "sle" in product or "slmicro" in product %}} -ansible_conditional: '("kernel-default" in ansible_facts.packages or "kernel-default-base" in ansible_facts.packages or "kernel-azure" in ansible_facts.packages)' +ansible_conditional: >- + "kernel-default" in ansible_facts.packages or + "kernel-default-base" in ansible_facts.packages or + "kernel-azure" in ansible_facts.packages {{% elif "ol" in families %}} ansible_conditional: '("kernel" in ansible_facts.packages or "kernel-uek" in ansible_facts.packages)' {{% elif product == "fedora" or "rhel" in product %}}