feat(base): Only set glibc locales if we are in glibc installation

This commit is contained in:
Marty Oehme 2025-02-21 16:02:11 +01:00
parent 457fb3517a
commit b57c92d458
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -86,7 +86,12 @@
src: /usr/share/zoneinfo/{{ timezone }}
state: link
- name: Set glibc locales
- name: Check if glibc locales exist
ansible.builtin.stat:
path: /etc/default/libc-locales
register: libc_locales_file
- name: Set correct glibc locales
ansible.builtin.lineinfile:
path: /etc/default/libc-locales
regexp: "^{{ item }}"
@ -94,6 +99,7 @@
state: present
create: true
loop: "{{ locales_enabled }}"
when: libc_locales_file.stat.exists
notify: glibc-locales-changed
handlers:
@ -104,4 +110,3 @@
- --force
- libc-locales
listen: glibc-locales-changed