Skip to content

Commit

Permalink
Merge pull request ANXS#40 from cahna/uuid-changed-fix
Browse files Browse the repository at this point in the history
add installation of postgresql-contrib for uuid-ossp, and fix reporting of uuid-ossp as "changed" on each run.
  • Loading branch information
pjan committed Jan 28, 2015
2 parents 1e63a85 + 8861657 commit 50028b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
sudo_user: "{{ postgresql_service_user }}"
shell: "psql {{item.name}} -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
with_items: postgresql_databases
register: uuid_ext_result
failed_when: uuid_ext_result.rc != 0 and ("already exists, skipping" not in uuid_ext_result.stderr)
changed_when: uuid_ext_result.rc == 0 and ("already exists, skipping" not in uuid_ext_result.stderr)
when: item.uuid_ossp is defined and item.uuid_ossp

- name: PostgreSQL | Add postgis to the databases with the requirement
Expand Down
1 change: 1 addition & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
with_items:
- "postgresql-{{postgresql_version}}"
- "postgresql-client-{{postgresql_version}}"
- "postgresql-contrib"

0 comments on commit 50028b2

Please sign in to comment.