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

@@ -14,7 +14,7 @@
- name: Setup locales
block:
- name: Configure locale.gen
when: not is_rhel | bool
when: _configuration_platform.locale_gen
ansible.builtin.lineinfile:
dest: /mnt/etc/locale.gen
regexp: "{{ item.regex }}"
@@ -25,7 +25,7 @@
label: "{{ item.line }}"
- name: Generate locales
when: not is_rhel | bool
when: _configuration_platform.locale_gen
ansible.builtin.command: "{{ chroot_command }} /usr/sbin/locale-gen"
register: configuration_locale_result
changed_when: configuration_locale_result.rc == 0