refactor(configuration): add platform_config dict and replace is_rhel/is_debian with os_family lookups

This commit is contained in:
2026-02-22 02:26:54 +01:00
parent cc30637f09
commit 3deb3ea751
11 changed files with 101 additions and 44 deletions

View File

@@ -1,4 +1,8 @@
---
- name: Resolve platform-specific configuration
ansible.builtin.set_fact:
_configuration_platform: "{{ configuration_platform_config[os_family] }}"
- name: Include configuration tasks
when: configuration_task.when | default(true)
ansible.builtin.include_tasks: "{{ configuration_task.file }}"
@@ -17,7 +21,7 @@
- file: users.yml
- file: sudo.yml
- file: selinux.yml
when: "{{ is_rhel | bool }}"
when: "{{ os_family == 'RedHat' }}"
loop_control:
loop_var: configuration_task
label: "{{ configuration_task.file }}"