Skip to content

Commit bc9cd83

Browse files
authored
Merge pull request #3 from singleplatform-eng/Upstream_changes
Upstream changes
2 parents 9ea080d + 28a6e9c commit bc9cd83

24 files changed

+389
-145
lines changed

.travis.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,34 @@
22

33
language: python
44
python: "2.7"
5+
sudo: required
6+
dist: trusty
57
services:
68
- docker
79

810
env:
9-
global:
10-
- ROLE_GLOBALS="postgresql_shared_buffers=32MB"
1111
matrix:
12-
- ROLE_OPTIONS="postgresql_version=9.1" ANSIBLE_VERSION="1.9.4"
13-
- ROLE_OPTIONS="postgresql_version=9.2" ANSIBLE_VERSION="1.9.4"
14-
- ROLE_OPTIONS="postgresql_version=9.3" ANSIBLE_VERSION="1.9.4"
15-
- ROLE_OPTIONS="postgresql_version=9.4" ANSIBLE_VERSION="1.9.4"
16-
- ROLE_OPTIONS="postgresql_version=9.5" ANSIBLE_VERSION="1.9.4"
17-
- ROLE_OPTIONS="postgresql_version=9.6" ANSIBLE_VERSION="1.9.4"
18-
- ROLE_OPTIONS="postgresql_version=9.1" ANSIBLE_VERSION="2.1.2.0"
19-
- ROLE_OPTIONS="postgresql_version=9.2" ANSIBLE_VERSION="2.1.2.0"
20-
- ROLE_OPTIONS="postgresql_version=9.3" ANSIBLE_VERSION="2.1.2.0"
21-
- ROLE_OPTIONS="postgresql_version=9.4" ANSIBLE_VERSION="2.1.2.0"
22-
- ROLE_OPTIONS="postgresql_version=9.5" ANSIBLE_VERSION="2.1.2.0"
23-
- ROLE_OPTIONS="postgresql_version=9.6" ANSIBLE_VERSION="2.1.2.0"
24-
25-
before_install:
26-
# Remove the PostgreSQL installed by Travis
27-
- sudo apt-get purge pgdg-keyring '^postgresql.*' -y
28-
- sudo apt-get autoremove -y -qq
29-
- sudo rm -rf /etc/postgresql
30-
- sudo rm -rf /var/lib/postgresql
31-
- sudo rm -f /etc/apt/sources.list.d/pgdg-source.list
32-
# Install some dependencies
33-
- sudo apt-get update -qq -y
34-
- sudo apt-get install -qq -y python-apt python-pycurl locales
35-
- echo 'en_US.UTF-8 UTF-8' | sudo tee /var/lib/locales/supported.d/local
12+
- IMAGE_NAME="ubuntu-upstart:14.04"
13+
- IMAGE_NAME="ubuntu:16.04-builded"
14+
- IMAGE_NAME="debian:8-builded"
15+
- IMAGE_NAME="debian:9-builded"
16+
- IMAGE_NAME="centos:7-builded"
17+
- IMAGE_NAME="centos:6-builded"
3618

3719
install:
38-
- pip install ansible=="$ANSIBLE_VERSION"
20+
- pip install ansible=="2.4.2.0" docker-py
21+
- ln -s ${PWD} tests/docker/ANXS.postgresql
3922

4023
script:
41-
- echo localhost > inventory
42-
4324
# Syntax check
44-
- ansible-playbook -i inventory tests/playbook.yml --syntax-check
25+
- ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml --syntax-check
4526

4627
# Play test
47-
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_GLOBALS $ROLE_OPTIONS"
28+
- ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml
4829

4930
# Idempotence test
50-
- ansible-playbook -i inventory tests/playbook.yml --connection=local --sudo -e "$ROLE_GLOBALS $ROLE_OPTIONS" > idempotence_out
31+
- ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml > idempotence_out
5132
- ./tests/idempotence_check.sh idempotence_out
5233

53-
# Testing with docker (experimental)
54-
- docker build -f tests/Dockerfile-ubuntu14.04 -t postgres_ubuntu14.04 .
55-
- docker build -f tests/Dockerfile-centos6 -t postgres_centos6 .
34+
notifications:
35+
webhooks: https://galaxy.ansible.com/api/v1/notifications/

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.svg?branch=master)](https://travis-ci.org/ANXS/postgresql)
22

3+
---
4+
Help Wanted! If you are able and willing to help maintain this Ansible role then please open a GitHub issue. A lot of people seem to use this role and we (quite obviously) need assistance!
5+
💖
6+
---
7+
38
Ansible role which installs and configures PostgreSQL, extensions, databases and users.
49

510

611
#### Installation
712

8-
This has been tested on Ansible 1.9.4 and higher.
13+
This has been tested on Ansible 2.4.0 and higher.
914

1015
To install:
1116

@@ -18,11 +23,25 @@ ansible-galaxy install ANXS.postgresql
1823
- 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`)
1924

2025

26+
#### Compatibility matrix
27+
| Distribution / PostgreSQL | <= 9.2 | 9.3 | 9.4 | 9.5 | 9.6 |
28+
| ------------------------- |:------:|:---:|:---:|:---:|:---:|
29+
| Ubuntu 14.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
30+
| Ubuntu 16.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
31+
| Debian 8.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
32+
| Debian 9.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
33+
| Centos 6.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
34+
| Centos 7.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:|
35+
36+
- :white_check_mark: - tested, works fine
37+
- :interrobang: - maybe works, not tested
38+
- :no_entry: - PostgreSQL has reached EOL
39+
2140
#### Variables
2241

2342
```yaml
2443
# Basic settings
25-
postgresql_version: 9.3
44+
postgresql_version: 9.6
2645
postgresql_encoding: 'UTF-8'
2746
postgresql_locale: 'en_US.UTF-8'
2847
postgresql_ctype: 'en_US.UTF-8'

Vagrantfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ 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 = "bento/ubuntu-16.04"
11+
#machine.vm.box = "bento/ubuntu-16.04"
1212
# machine.vm.box = "ubuntu/trusty64"
1313
#machine.vm.box = "ubuntu/precise64"
1414
#machine.vm.box = "debian/jessie64"
1515
#machine.vm.box = "debian/wheezy64"
16-
#machine.vm.box = "chef/centos-7.1"
17-
#machine.vm.box = "chef/centos-6.6"
16+
machine.vm.box = "centos/7"
17+
#machine.vm.box = "centos/6"
1818

1919
machine.vm.network :private_network, ip: '192.168.88.22'
2020
machine.vm.hostname = 'anxs.local'
2121

2222
machine.vm.provision 'ansible' do |ansible|
2323
ansible.playbook = 'tests/playbook.yml'
24-
ansible.sudo = true
24+
ansible.verbose = "v"
25+
ansible.become = true
2526
ansible.inventory_path = 'vagrant-inventory'
2627
ansible.host_key_checking = false
2728
end

ansible.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[defaults]
2-
roles_path = ../
2+
roles_path = ../
3+
allow_world_readable_tmpfiles = True

0 commit comments

Comments
 (0)