From 1e365489bb6f4519a3b4ac8770d4e4ff03339bbd Mon Sep 17 00:00:00 2001
From: teacup-on-rockingchair
<315160+teacup-on-rockingchair@users.noreply.github.com>
Date: Thu, 18 Apr 2024 11:19:23 +0300
Subject: [PATCH] Invert the logic for variable dependency for service disabled
rules
---
.../service_firewalld_disabled/rule.yml | 3 +--
.../service_ip6tables_enabled/rule.yml | 10 ++++++++++
.../service_iptables_enabled/rule.yml | 4 ++--
.../service_nftables_disabled/rule.yml | 3 +--
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/linux_os/guide/system/network/network-firewalld/firewalld_deactivation/service_firewalld_disabled/rule.yml b/linux_os/guide/system/network/network-firewalld/firewalld_deactivation/service_firewalld_disabled/rule.yml
index e67f50e1efd..ae471731f81 100644
--- a/linux_os/guide/system/network/network-firewalld/firewalld_deactivation/service_firewalld_disabled/rule.yml
+++ b/linux_os/guide/system/network/network-firewalld/firewalld_deactivation/service_firewalld_disabled/rule.yml
@@ -44,8 +44,7 @@ template:
packagename: firewalld
servicename: firewalld
variable: var_network_filtering_service
- value: nftables|iptables
- operation: pattern match
+ value: firewalld
{{%- else %}}
template:
name: service_disabled
diff --git a/linux_os/guide/system/network/network-iptables/iptables_activation/service_ip6tables_enabled/rule.yml b/linux_os/guide/system/network/network-iptables/iptables_activation/service_ip6tables_enabled/rule.yml
index b9c907e6ddc..8c90fb0ecdc 100644
--- a/linux_os/guide/system/network/network-iptables/iptables_activation/service_ip6tables_enabled/rule.yml
+++ b/linux_os/guide/system/network/network-iptables/iptables_activation/service_ip6tables_enabled/rule.yml
@@ -34,8 +34,18 @@ ocil: |-
{{{ ocil_service_enabled(service="ip6tables") }}}
+{{%- if product in [ "sle12", "sle15" ] %}}
+template:
+ name: service_enabled_guard_var
+ vars:
+ packagename: iptables
+ servicename: iptables
+ variable: var_network_filtering_service
+ value: iptables
+{{%- else %}}
template:
name: service_enabled
vars:
servicename: ip6tables
packagename: iptables-ipv6
+{{%- endif %}}
diff --git a/linux_os/guide/system/network/network-iptables/iptables_activation/service_iptables_enabled/rule.yml b/linux_os/guide/system/network/network-iptables/iptables_activation/service_iptables_enabled/rule.yml
index 092b18ebec0..066dcf1cd81 100644
--- a/linux_os/guide/system/network/network-iptables/iptables_activation/service_iptables_enabled/rule.yml
+++ b/linux_os/guide/system/network/network-iptables/iptables_activation/service_iptables_enabled/rule.yml
@@ -40,8 +40,8 @@ ocil: |-
template:
name: service_enabled_guard_var
vars:
- packagename: iptables
- servicename: iptables
+ packagename: ip6tables
+ servicename: iptables-ipv6
variable: var_network_filtering_service
value: iptables
{{%- else %}}
diff --git a/linux_os/guide/system/network/network-nftables/service_nftables_disabled/rule.yml b/linux_os/guide/system/network/network-nftables/service_nftables_disabled/rule.yml
index 53fb41eed93..45fa774a56c 100644
--- a/linux_os/guide/system/network/network-nftables/service_nftables_disabled/rule.yml
+++ b/linux_os/guide/system/network/network-nftables/service_nftables_disabled/rule.yml
@@ -45,8 +45,7 @@ template:
packagename: nftables
servicename: nftables
variable: var_network_filtering_service
- value: firewalld|iptables
- operation: pattern match
+ value: nftables
{{%- else %}}
template:
name: service_disabled