aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorPaul B <paul.bonaud@capitainetrain.com>2018-08-31 11:49:09 +0200
committerPaul B <paul.bonaud@capitainetrain.com>2018-08-31 12:00:24 +0200
commitd0bc90e08c29e881c388c6803ed9c49dff1f1776 (patch)
treee5f633a7461f3d339ef89758fc7bb3f1b91563d3 /README.md
downloadansible-postgresql-role-d0bc90e08c29e881c388c6803ed9c49dff1f1776.tar.gz
ansible-postgresql-role-d0bc90e08c29e881c388c6803ed9c49dff1f1776.tar.zst
ansible-postgresql-role-d0bc90e08c29e881c388c6803ed9c49dff1f1776.zip
Initial commit open sourcing Postgresql Ansible role1.0.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md103
1 files changed, 103 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f07f2d4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,103 @@
1## PostgreSQL Ansible role [![Build Status](https://travis-ci.org/trainline-eu/postgresql.svg?branch=master)](https://travis-ci.org/trainline-eu/postgresql)
2
3Ansible role which installs and configures PostgreSQL clusters, databases and users.
4
5#### Installation
6
7This role has been tested on Ansible 2.3.0 and higher.
8
9To install:
10
11```
12ansible-galaxy install trainline-eu.postgresql
13```
14
15
16#### Dependencies
17
18No dependencies
19
20Recommended dependencies:
21- trainline-eu.barman
22
23#### Compatibility matrix
24
25This table lists the tested version of OS/PostgreSQL couples.
26
27| Distribution / PostgreSQL | 9.1 | 9.4 | 9.5 | 9.6 | 10 | 11 |
28| ------------------------- |:---:|:---:|:---:|:---:|:---:|:---:|
29| Debian 8.x | :no_entry: :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :grey_question:|
30| Debian 9.x | :no_entry: :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :grey_question:|
31
32- :white_check_mark: - tested, works fine
33- :grey_question: - will work in the future (help out if you can)
34- :interrobang: - maybe works, not tested
35- :no_entry: - PostgreSQL has reached EOL
36
37
38#### Variables
39
40```yaml
41# Basic settings
42postgres_listen_addresses: [ '127.0.0.1' ] # Optional
43postgres_log_dir: '/home/postgres-logs' # Optional
44postgres_data_dir: '/home/postgres' # Optional
45postgres_clusters: # Mandatory
46 - version: 10 # Mandatory
47 name: 'main' # Mandatory
48 port: 5432 # Mandatory
49 checksums: True # Optional
50 fsync_enabled: False # Optional
51 archive_enabled: False # Optional
52 # List of users to be created (optional)
53 users:
54 - username: 'replicator' # Mandatory
55 password: 'SuperSecret' # Mandatory
56 permissions: 'REPLICATION' # Mandatory
57 # List of databases to be created (optional)
58 databases:
59 - dbname: my_database # Mandatory
60 owner: john # Mandatory
61
62# Postgres config (Optional)
63postgres_log_line_prefix: '%m [%p] database: %d host: %h user: %u '
64postgres_datestyle: 'iso, dmy'
65postgres_locale_formats: fr_FR.UTF-8
66postgres_text_search_config: pg_catalog.french
67
68# Postgres pg_hba config (optional)
69postgres_allowed_hosts:
70 - user: all
71 range: 10.0.0.0/24
72postgres_replication_hosts:
73 - user: replicator
74 range: 10.0.0.0/24
75```
76
77#### Testing
78
79This project comes with a `test/main.yml` testing playbook. It uses `Docker` to provision containers locally and sets up a 3 node postgresql cluster with a barman server.
80
81Coverage of this playbook is probably not complete but at least it's there.
82
83If you are contributing, please first test your changes in a new playbook in the `test/` directory within docker containers, (using the targeted distribution), and if possible, ensure your change is covered in the tests found in [.travis.yml](./.travis.yml).
84
85#### License
86
87Licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
88
89
90#### Thanks
91
92Creators:
93- [Gaëtan Duchaussois](https://twitter.com/gduchaussois)
94- [Théophile Helleboid](https://twitter.com/chtitux)
95- [Paul Bonaud](https://twitter.com/paulRb_r)
96
97Maintainers:
98- [Théophile Helleboid](https://twitter.com/chtitux)
99- [Paul Bonaud](https://twitter.com/paulRb_r)
100
101#### Feedback, bug-reports, requests, ...
102
103Are [welcome](https://github.com/trainline-eu/postgresql/issues)!