From bf5f7841b32f8bab9e8a5424538d297cc75172c5 Mon Sep 17 00:00:00 2001 From: David Farrington Date: Tue, 24 Feb 2015 20:43:19 +0000 Subject: [PATCH] Generate locale if it hasnt yet been done --- tasks/configure.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index ea115de9..a2bb928f 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -9,6 +9,15 @@ mode: 0700 register: pgdata_dir_exist +- name: PostgreSQL | Get locales + shell: locale -a + register: locales + +- name: PostgreSQL | Ensure the locale is generated + sudo: yes + shell: locale-gen {{postgresql_locale.split('.').0}} + when: "'{{postgresql_locale.split('.').0 }}' not in locales.stdout" + - name: PostgreSQL | Reset the cluster - drop the existing one shell: pg_dropcluster --stop {{postgresql_version}} {{postgresql_cluster_name}} sudo: yes