diff --git a/void_base.yaml b/void_base.yaml index 70d7987..d601286 100644 --- a/void_base.yaml +++ b/void_base.yaml @@ -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 -