Create a separate 'locales' roles (+ en_US)
This commit is contained in:
parent
ccb1f90c79
commit
7f6c36daaf
11 changed files with 26 additions and 18 deletions
|
@ -2,9 +2,13 @@
|
||||||
---
|
---
|
||||||
# Put a common configuration on all servers
|
# Put a common configuration on all servers
|
||||||
- hosts: all,!unifi
|
- hosts: all,!unifi
|
||||||
|
vars:
|
||||||
|
locales_default: en_US.UTF-8
|
||||||
|
locales_additional:
|
||||||
|
- fr_FR.UTF-8
|
||||||
roles:
|
roles:
|
||||||
- baseconfig
|
- debian_common
|
||||||
|
- locales
|
||||||
- basesecurity
|
- basesecurity
|
||||||
- ldap_client
|
|
||||||
- logrotate
|
- logrotate
|
||||||
- update_motd
|
- update_motd
|
||||||
|
|
|
@ -39,21 +39,6 @@
|
||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
# Patriotisme
|
|
||||||
- name: Ensure French UTF-8 locale exists
|
|
||||||
locale_gen:
|
|
||||||
name: fr_FR.UTF-8
|
|
||||||
state: present
|
|
||||||
|
|
||||||
# Fix LC_CTYPE="C"
|
|
||||||
- name: Select default locale
|
|
||||||
debconf:
|
|
||||||
name: locales
|
|
||||||
question: locales/default_environment_locale
|
|
||||||
value: fr_FR.UTF-8
|
|
||||||
vtype: select
|
|
||||||
notify: Reconfigure locales
|
|
||||||
|
|
||||||
# APT-List Changes : send email with changelog
|
# APT-List Changes : send email with changelog
|
||||||
- include_tasks: apt-listchanges.yml
|
- include_tasks: apt-listchanges.yml
|
||||||
|
|
4
roles/locales/defaults/main.yml
Normal file
4
roles/locales/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
locales_default: en_US.UTF-8
|
||||||
|
locales_additional: []
|
||||||
|
...
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
# Reconfigure locales when conf changes
|
|
||||||
- name: Reconfigure locales
|
- name: Reconfigure locales
|
||||||
command: dpkg-reconfigure locales -f noninteractive
|
command: dpkg-reconfigure locales -f noninteractive
|
||||||
|
...
|
15
roles/locales/tasks/main.yml
Normal file
15
roles/locales/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
- name: Install locales
|
||||||
|
locale_gen:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ [locales_default] + locales_additional }}"
|
||||||
|
|
||||||
|
- name: Select default locale
|
||||||
|
debconf:
|
||||||
|
name: locales
|
||||||
|
question: locales/default_environment_locale
|
||||||
|
value: "{{ locales_default }}"
|
||||||
|
vtype: select
|
||||||
|
notify: Reconfigure locales
|
||||||
|
...
|
Loading…
Reference in a new issue