refactor(configuration): consolidate firewall into one phase-aware path

This commit is contained in:
2026-05-27 05:28:00 +02:00
parent d922efd2e4
commit 00acd4d200
7 changed files with 67 additions and 23 deletions

View File

@@ -165,7 +165,10 @@
enabled: "{{ system_raw.features.selinux.enabled | bool }}"
firewall:
enabled: "{{ system_raw.features.firewall.enabled | bool }}"
backend: "{{ system_raw.features.firewall.backend | string | lower }}"
backend: >-
{{ (system_raw.features.firewall.backend | default('') | string | lower | trim)
if (system_raw.features.firewall.backend | default('') | string | lower | trim | length > 0)
else ('ufw' if (system_raw.os | default('') | string | lower) in ['debian', 'ubuntu', 'ubuntu-lts'] else 'firewalld') }}
toolkit: "{{ system_raw.features.firewall.toolkit | string | lower }}"
ssh:
enabled: "{{ system_raw.features.ssh.enabled | bool }}"