From a13d89da68464f219428c947dad6f89e28f55dc8 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Fri, 14 Apr 2017 16:07:34 +0200 Subject: [PATCH] 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. --- .../targets/setup_postgresql_db/tasks/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/integration/targets/setup_postgresql_db/tasks/main.yml b/test/integration/targets/setup_postgresql_db/tasks/main.yml index 9f4321d0f55..e87687cd2da 100644 --- a/test/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/test/integration/targets/setup_postgresql_db/tasks/main.yml @@ -80,12 +80,13 @@ group: "{{ pg_group }}" mode: "0644" -- name: Generate pt_BR locale (Debian) - command: locale-gen pt_BR - when: ansible_os_family == 'Debian' - -- name: Generate es_ES locale (Debian) - command: locale-gen es_ES +- name: Generate locales (Debian) + locale_gen: + name: '{{ item }}' + state: present + with_items: + - pt_BR + - es_ES when: ansible_os_family == 'Debian' # Suse: locales are installed by default (glibc-locale package).