library/roles/deb-set-locale: Force the writing of /etc/default/locale

This commit is contained in:
Andrea Dell'Amico 2016-09-30 19:24:21 +02:00
parent bedaa43a30
commit e0a2c7bddf
2 changed files with 17 additions and 8 deletions

View File

@ -1,3 +1,8 @@
--- ---
deb_default_locale: "en_US.UTF-8" deb_default_locale: "en_US.UTF-8"
deb_locales: "{{ deb_default_locale }} en_US, it_IT.UTF-8 it_IT" deb_locales: "{{ deb_default_locale }} en_US, it_IT.UTF-8 it_IT"
deb_locales_list:
- '{{ deb_default_locale }}'
- en_US
- it_IT.UTF-8
- it_IT

View File

@ -1,12 +1,16 @@
--- ---
- name: Generate locales - block:
debconf: name=locales question='locales/locales_to_be_generated' value='{{ deb_locales }}' vtype='multiselect' - name: Define the locales to be generated
tags: debconf: name=locales question='locales/locales_to_be_generated' value='{{ deb_locales }}' vtype='multiselect'
- locale
- name: Update the locale default
debconf: name=locales question='locales/default_environment_locale' value='{{ deb_default_locale }}' vtype='select'
- name: Update the locale default - name: Generate the locales
debconf: name=locales question='locales/default_environment_locale' value='{{ deb_default_locale }}' vtype='select' locale_gen: name={{ item }} state=present
tags: with_items: '{{ deb_locales_list }}'
- locale
- name: Set the default locale
shell: update-locale LANG={{ deb_default_locale }}
tags: locale