diff --git a/roles/debian-base/handlers/main.yml b/roles/debian-base/handlers/main.yml index 76239c2..8071c56 100644 --- a/roles/debian-base/handlers/main.yml +++ b/roles/debian-base/handlers/main.yml @@ -18,3 +18,7 @@ service: name: nagios-nrpe-server state: restarted +- name: Generate locales + command: /usr/sbin/locale-gen +- name: Reconfigure tzdata + command: dpkg-reconfigure -f noninteractive tzdata diff --git a/roles/debian-base/tasks/locale.yml b/roles/debian-base/tasks/locale.yml index faf125b..3ee9e6d 100644 --- a/roles/debian-base/tasks/locale.yml +++ b/roles/debian-base/tasks/locale.yml @@ -1,6 +1,10 @@ -- name: Set to generate locales +- name: Configure debconf for locales debconf: name: locales - question: locales/locales_to_be_generated - value: en_US.UTF-8 UTF-8, es_ES.UTF-8 UTF-8 - vtype: multiselect + question: "{{ item.question }}" + value: "{{ item.value }}" + vtype: "{{ item.vtype }}" + loop: + - { question: "locales/locales_to_be_generated", value: "en_US.UTF-8 UTF-8, es_ES.UTF-8 UTF-8", vtype: "multiselect" } + - { question: "locales/default_environment_locales", value: "en_US.UTF-8", vtype: "string" } + notify: Generate locales diff --git a/roles/debian-base/tasks/tzdata.yml b/roles/debian-base/tasks/tzdata.yml index 9560354..8683519 100644 --- a/roles/debian-base/tasks/tzdata.yml +++ b/roles/debian-base/tasks/tzdata.yml @@ -8,3 +8,4 @@ - { question: "tzdata/Areas", value: "Europe" } - { question: "tzdata/Zones/Europe", value: "Madrid" } - { question: "tzdata/Zones/Etc", value: "UTC" } + notify: Reconfigure tzdata