Skip to content

Commit

Permalink
Merge pull request ANXS#32 from calvinpy/master
Browse files Browse the repository at this point in the history
Postgis
  • Loading branch information
pjan committed Jan 28, 2015
2 parents 5b4ba3b + 639d841 commit 1e63a85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tasks/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@
shell: "psql {{item.name}} -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
with_items: postgresql_databases
when: item.uuid_ossp is defined and item.uuid_ossp

- name: PostgreSQL | Add postgis to the databases with the requirement
sudo: yes
sudo_user: "{{postgresql_admin_user}}"
shell: "psql {{item.name}} -c 'CREATE EXTENSION IF NOT EXISTS postgis;'&&psql {{item.name}} -c 'CREATE EXTENSION IF NOT EXISTS postgis_topology;'"
with_items: postgresql_databases
when: item.gis is defined and item.gis
1 change: 1 addition & 0 deletions tasks/extensions/postgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
with_items:
- libgeos-c1
- "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}"
- "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}-scripts"
notify:
- restart postgresql

0 comments on commit 1e63a85

Please sign in to comment.