File tree Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 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 )
2
2
3
3
Ansible role which installs and configures PostgreSQL, extensions, databases and users.
4
4
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ Vagrant.configure('2') do |config|
8
8
config . ssh . private_key_path = '~/.vagrant.d/insecure_private_key'
9
9
10
10
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"
12
13
#machine.vm.box = "ubuntu/precise64"
13
14
#machine.vm.box = "debian/jessie64"
14
15
#machine.vm.box = "debian/wheezy64"
@@ -17,6 +18,7 @@ Vagrant.configure('2') do |config|
17
18
18
19
machine . vm . network :private_network , ip : '192.168.88.22'
19
20
machine . vm . hostname = 'anxs.local'
21
+
20
22
machine . vm . provision 'ansible' do |ansible |
21
23
ansible . playbook = 'tests/playbook.yml'
22
24
ansible . sudo = true
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ postgresql_ext_install_postgis: no
31
31
32
32
postgresql_ext_postgis_version : " 2.1" # be careful: check whether the postgresql/postgis versions work together
33
33
34
+ postgresql_ext_postgis_deps :
35
+ - libgeos-c1
36
+ - " postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}"
37
+ - " postgresql-{{postgresql_version}}-postgis-scripts"
38
+
34
39
# List of databases to be created (optional)
35
40
postgresql_databases : []
36
41
Original file line number Diff line number Diff line change 1
1
# file: postgresql/tasks/extensions/postgis.yml
2
2
3
+ - include_vars : " {{ item }}"
4
+ with_first_found :
5
+ - " ../vars/{{ ansible_distribution_release }}.yml"
6
+ - " ../vars/empty.yml"
7
+
3
8
- name : PostgreSQL | Extensions | Make sure the postgis extensions are installed
4
9
apt :
5
10
name : " {{item}}"
6
11
state : present
7
12
update_cache : yes
8
13
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 }}"
13
15
notify :
14
16
- restart postgresql
Original file line number Diff line number Diff line change 39
39
name : " {{item}}"
40
40
state : present
41
41
update_cache : yes
42
+ default_release : " {{ansible_distribution_release}}-pgdg"
42
43
cache_valid_time : " {{apt_cache_valid_time | default (3600)}}"
43
44
environment : " {{postgresql_env}}"
44
45
with_items :
Original file line number Diff line number Diff line change
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"
You can’t perform that action at this time.
0 commit comments