1
- ## ANXS - PostgreSQL [ ![ Build Status] ( https://travis-ci.org /ANXS/postgresql.svg?branch=master )] ( https://travis-ci.org /ANXS/postgresql )
1
+ ## ANXS - PostgreSQL [ ![ Build Status] ( https://travis-ci.com /ANXS/postgresql.svg?branch=master )] ( https://travis-ci.com /ANXS/postgresql )
2
2
3
3
---
4
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!
@@ -20,12 +20,32 @@ ansible-galaxy install ANXS.postgresql
20
20
21
21
#### Example Playbook
22
22
23
- Including an example of how to use your role:
23
+ An example how to include this role:
24
24
25
- - hosts: postgresql-server
25
+ ``` yml
26
+ ---
27
+ - hosts : postgresql-server
28
+ roles :
29
+ - role : ANXS.postgresql
26
30
become : yes
27
- roles:
28
- - { role: anxs.postgresql }
31
+ ` ` `
32
+
33
+ An example how to include this role as a task:
34
+
35
+ ` ` ` yml
36
+ ---
37
+ - hosts : postgresql-server
38
+ tasks :
39
+ - block : # workaround, see https://stackoverflow.com/a/56558842
40
+ - name : PSQL installation and configuration
41
+ include_role :
42
+ name : ANXS.postgresql
43
+ vars :
44
+ postgresql_users :
45
+ - name : abc
46
+ password : abc
47
+ become : true
48
+ ` ` `
29
49
30
50
#### Dependencies
31
51
@@ -34,16 +54,13 @@ Including an example of how to use your role:
34
54
35
55
# ### Compatibility matrix
36
56
37
- | Distribution / PostgreSQL | <= 9.3 | 9.4 | 9.5 | 9.6 | 10 | 11 | 12 |
38
- | ------------------------- | :---:| :---:| :---:| :---:| :--:| :--:| :--:|
39
- | Ubuntu 14.04 | :no_entry : | :no_entry : | :no_entry : | :no_entry : | :no_entry : | :no_entry : | :no_entry : |
40
- | Ubuntu 16.04 | :no_entry : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
41
- | Debian 8.x | :no_entry : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
42
- | Debian 9.x | :no_entry : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
43
- | CentOS 6.x | :no_entry : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
44
- | CentOS 7.x | :no_entry : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
45
- | CentOS 8.x | :no_entry : | :grey_question : | :grey_question : | :grey_question : | :grey_question : | :grey_question : | :grey_question : |
46
- | Fedora latest | :no_entry : | :x : | :x : | :x : | :x : | :x : | :x : |
57
+ | Distribution / PostgreSQL | 9.5 | 9.6 | 10 | 11 | 12 | 13 |
58
+ | ------------------------- |:---:|:---:|:--:|:--:|:--:|:--:|
59
+ | Debian 8.x | :white_check_mark : | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
60
+ | Debian 9.x | :white_check_mark : | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
61
+ | CentOS 7.x | :white_check_mark : | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
62
+ | CentOS 8.x | :grey_question : | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :no_entry: |
63
+ | Fedora latest | :x : | :x: | :x: | :x: | :x: | :x: |
47
64
48
65
- :white_check_mark : - tested, works fine
49
66
- :warning : - Not for production use
@@ -79,6 +96,7 @@ postgresql_databases:
79
96
uuid_ossp: yes # flag to install the uuid-ossp extension on this database (yes/no)
80
97
citext: yes # flag to install the citext extension on this database (yes/no)
81
98
encoding: "UTF-8" # override global {{ postgresql_encoding }} variable per database
99
+ state: "present" # optional; one of 'present', 'absent', 'dump', 'restore'
82
100
lc_collate: "en_GB.UTF-8" # override global {{ postgresql_locale }} variable per database
83
101
lc_ctype: "en_GB.UTF-8" # override global {{ postgresql_ctype }} variable per database
84
102
@@ -93,7 +111,8 @@ postgresql_database_extensions:
93
111
postgresql_users:
94
112
- name: baz
95
113
pass: pass
96
- encrypted : yes # if password should be encrypted, postgresql >= 10 does only accepts encrypted passwords, ansible module default
114
+ encrypted: yes # if password should be encrypted, postgresql >= 10 does only accepts encrypted passwords
115
+ state: "present" # optional; one of 'present', 'absent'
97
116
98
117
# List of schemas to be created (optional)
99
118
postgresql_database_schemas:
0 commit comments