refactor(configuration): add platform_config dict and replace is_rhel/is_debian with os_family lookups
This commit is contained in:
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user