Skip to content

Commit 043bf06

Browse files
author
Colin Hoglund
authored
Merge pull request #1 from singleplatform-eng/merge_upstream
Merge upstream
2 parents 50dcf76 + 9446ab5 commit 043bf06

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.png?branch=master)](https://travis-ci.org/ANXS/postgresql)
1+
## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.svg?branch=master)](https://travis-ci.org/ANXS/postgresql)
22

33
Ansible role which installs and configures PostgreSQL, extensions, databases and users.
44

Vagrantfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Vagrant.configure('2') do |config|
88
config.ssh.private_key_path = '~/.vagrant.d/insecure_private_key'
99

1010
config.vm.define 'anxs' do |machine|
11-
machine.vm.box = "ubuntu/trusty64"
11+
machine.vm.box = "bento/ubuntu-16.04"
12+
# machine.vm.box = "ubuntu/trusty64"
1213
#machine.vm.box = "ubuntu/precise64"
1314
#machine.vm.box = "debian/jessie64"
1415
#machine.vm.box = "debian/wheezy64"
@@ -17,6 +18,7 @@ Vagrant.configure('2') do |config|
1718

1819
machine.vm.network :private_network, ip: '192.168.88.22'
1920
machine.vm.hostname = 'anxs.local'
21+
2022
machine.vm.provision 'ansible' do |ansible|
2123
ansible.playbook = 'tests/playbook.yml'
2224
ansible.sudo = true

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ postgresql_ext_install_postgis: no
3131

3232
postgresql_ext_postgis_version: "2.1" # be careful: check whether the postgresql/postgis versions work together
3333

34+
postgresql_ext_postgis_deps:
35+
- libgeos-c1
36+
- "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}"
37+
- "postgresql-{{postgresql_version}}-postgis-scripts"
38+
3439
# List of databases to be created (optional)
3540
postgresql_databases: []
3641

tasks/extensions/postgis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# file: postgresql/tasks/extensions/postgis.yml
22

3+
- include_vars: "{{ item }}"
4+
with_first_found:
5+
- "../vars/{{ ansible_distribution_release }}.yml"
6+
- "../vars/empty.yml"
7+
38
- name: PostgreSQL | Extensions | Make sure the postgis extensions are installed
49
apt:
510
name: "{{item}}"
611
state: present
712
update_cache: yes
813
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
9-
with_items:
10-
- libgeos-c1
11-
- "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}"
12-
- "postgresql-{{postgresql_version}}-postgis-scripts"
14+
with_items: "{{ postgresql_ext_postgis_deps }}"
1315
notify:
1416
- restart postgresql

tasks/install.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
name: "{{item}}"
4040
state: present
4141
update_cache: yes
42+
default_release: "{{ansible_distribution_release}}-pgdg"
4243
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
4344
environment: "{{postgresql_env}}"
4445
with_items:

vars/xenial.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
postgresql_ext_postgis_deps:
4+
- libgeos-c1v5
5+
- "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}"
6+
- "postgresql-{{postgresql_version}}-postgis-scripts"

0 commit comments

Comments
 (0)