Skip to content

Commit 0d09716

Browse files
Optimize jinja2 conditions to cover all base SLE platforms
1 parent e8e7521 commit 0d09716

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

linux_os/guide/system/software/updating/ensure_gpgcheck_never_disabled/ansible/shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- name: Grep for {{{ pkg_manager }}} repo section names
77
ansible.builtin.shell: |
88
set -o pipefail
9-
{{%- if product in ["sle12", "sle15", "sle16", "slmicro5"] %}}
9+
{{%- if 'sle' in product or 'slmicro' in product %}}
1010
grep -HEr '^\[.+\]' -r /etc/zypp/repos.d/
1111
{{%- else %}}
1212
grep -HEr '^\[.+\]' -r /etc/yum.repos.d/

shared/templates/sysctl/ansible.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
- name: {{{ rule_title }}} - Set fact for sysctl paths
1212
ansible.builtin.set_fact:
13-
{{% if product in ["sle12", "sle15", "sle16", "slmicro5", "slmicro6"] %}}
13+
{{% if 'sle' in product or 'slmicro' in product %}}
1414
sysctl_paths:
1515
- "/run/sysctl.d/"
1616
- "/etc/sysctl.d/"

0 commit comments

Comments
 (0)