feat(base): Only set glibc locales if we are in glibc installation
This commit is contained in:
parent
457fb3517a
commit
b57c92d458
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue