Debian: really generate locales

/usr/sbin/locale-gen differs between Debian and Ubuntu. With Debian,
locales must be added to /etc/locale.gen before calling locale-gen
command. With Ubuntu, /etc/locale.gen is updated by
/usr/sbin/locale-gen.

Use the locale-gen module which handles both distributions.
pull/24092/head
Pierre-Louis Bonicoli 8 years ago committed by Matt Clay
parent bf5d87af07
commit a13d89da68

@ -80,12 +80,13 @@
group: "{{ pg_group }}" group: "{{ pg_group }}"
mode: "0644" mode: "0644"
- name: Generate pt_BR locale (Debian) - name: Generate locales (Debian)
command: locale-gen pt_BR locale_gen:
when: ansible_os_family == 'Debian' name: '{{ item }}'
state: present
- name: Generate es_ES locale (Debian) with_items:
command: locale-gen es_ES - pt_BR
- es_ES
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
# Suse: locales are installed by default (glibc-locale package). # Suse: locales are installed by default (glibc-locale package).

Loading…
Cancel
Save