Skip to content

Commit

Permalink
Generate locale if it hasnt yet been done
Browse files Browse the repository at this point in the history
  • Loading branch information
David Farrington committed Mar 15, 2015
1 parent 47fb285 commit bf5f784
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf5f784

Please sign in to comment.