Skip to content

Commit

Permalink
Merge pull request ANXS#69 from ANXS/farridav/generate_locale
Browse files Browse the repository at this point in the history
Generate locale if it hasnt yet been done
  • Loading branch information
soupdiver committed Mar 20, 2015
2 parents 866dd80 + 28bba26 commit 3a8b0d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ language: python
python: "2.7"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
- sudo apt-get install -qq python-apt python-pycurl locales
- echo 'en_US.UTF-8 UTF-8' | sudo tee /var/lib/locales/supported.d/local
install:
- pip install ansible==1.5.0
- pip install ansible==1.6.2
script:
- echo localhost > inventory
- ansible-playbook -i inventory test.yml --syntax-check
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Ansible role which installs and configures PostgreSQL, extensions, databases and


#### Requirements & Dependencies
- Tested on Ansible 1.4 or higher.
- Tested on Ansible 1.6 or higher.
- ANXS.monit ([Galaxy](https://galaxy.ansible.com/list#/roles/502)/[GH](https://github.com/ANXS/monit)) if you want monit protection (in that case, you should set `monit_protection: true`)


Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ galaxy_info:
author: pjan vandaele
company: ANXS
description: "Install and configure PostgreSQL, dependencies, extensions, databases and users."
min_ansible_version: 1.4
min_ansible_version: 1.6
license: MIT
platforms:
- name: Ubuntu
Expand Down
4 changes: 4 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
mode: 0700
register: pgdata_dir_exist

- name: PostgreSQL | Ensure the locale is generated
sudo: yes
locale_gen: name={{postgresql_locale}} state=present

- name: PostgreSQL | Reset the cluster - drop the existing one
shell: pg_dropcluster --stop {{postgresql_version}} {{postgresql_cluster_name}}
sudo: yes
Expand Down
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
state: present
update_cache: yes
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
with_items: ["python-psycopg2", "python-pycurl"]
with_items: ["python-psycopg2", "python-pycurl", "locales"]

- name: PostgreSQL | Install PostgreSQL
apt:
Expand Down

0 comments on commit 3a8b0d4

Please sign in to comment.