Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions shared/applicability/oval/system_with_kernel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{% endif %}}
{{% if 'sle' in product or 'slmicro' in product %}}
<criterion comment="kernel-default-base is installed" test_ref="inventory_test_kernel_default_base_installed" />
<criterion comment="kernel-azure is installed" test_ref="inventory_test_kernel_azure_installed" />
{{% endif %}}
</criteria>
</definition>
Expand All @@ -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 %}}
Expand Down
18 changes: 14 additions & 4 deletions shared/applicability/system_with_kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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 %}}
Expand All @@ -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)'
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 %}}
Expand Down
Loading