Installs postgresql, manages users and databases. https://www.postgresql.org
Go to file
Andrea Dell'Amico 758b309594
Add a .gitignore.
2023-10-15 15:12:34 +02:00
defaults New defaults: postgresql 16, postgis 3. 2023-10-11 11:54:01 +02:00
files backup and clean of wal files 2021-09-16 23:54:17 +02:00
handlers Remove the pgpool tasks and files. 2021-04-02 18:08:23 +02:00
library Fix a typo. The r mode was not removed. 2023-10-11 18:53:56 +02:00
meta Fix the meta. 2023-10-11 17:56:26 +02:00
tasks Fix the permissions of /usr/local/sbin/postgresql_wal_backup_and_removal 2021-09-18 14:35:35 +02:00
templates Update 'templates/postgresql-backup.sh.j2' 2023-03-24 19:07:57 +01:00
tests Initial commit 2020-06-03 19:19:32 +02:00
vars Initial commit 2020-06-03 19:19:32 +02:00
.gitignore Add a .gitignore. 2023-10-15 15:12:34 +02:00
LICENSE Initial commit 2020-06-03 19:19:32 +02:00
README.md Import the old role, Ubuntu only. 2020-06-03 19:53:13 +02:00

README.md

Role Name

A role that installs PostgreSQL and manages databases and users. It can also install pgPoolII

Role Variables

The most important variables are listed below:

psql_postgresql_install: True
psql_pkg_state: present
postgresql_enabled: True
psql_pgpool_install: False
psql_pgpool_service_install: False
psql_version: 11
psql_db_host: localhost
psql_listen_on_ext_int: False
psql_use_alternate_data_dir: False
psql_enable_ssl: False
psql_force_ssl_client_connection: False
postgresql_letsencrypt_managed: '{{ psql_enable_ssl }}'

psql_db_data:
  # Example of line needed to create a db, create the user that owns the db, manage the db accesses (used by iptables too). All the fields are mandatory.
  - { name: '{{ psql_db_name }}', encoding: 'UTF8', user: '{{ psql_db_user }}', pwd: '{{ psql_db_pwd }}', roles: 'NOCREATEDB,NOSUPERUSER', extensions: [ 'postgis', 'pgpool_regclass', 'pgpool_recovery' ], allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ], managedb: True }
  # Example of line needed to manage the db accesses (used by iptables too), without creating the db and the user. Useful, for example, to give someone access to the postgresql db
  - { name: '{{ psql_db_name }}', user: '{{ psql_db_user }}', allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ], managedb: False }
  # Example of line needed to remove a db, create the user that owns the db, manage the db accesses (used by iptables too). All the fields are mandatory.
  - { name: '{{ psql_db_name }}', encoding: 'UTF8', user: '{{ psql_db_user }}', pwd: '{{ psql_db_pwd }}', managedb: True, roles: 'NOCREATEDB,NOSUPERUSER', extensions: [ 'postgis', 'pgpool_regclass', 'pgpool_recovery' ], allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ], state=absent }

Dependencies

None

License

EUPL-1.2

Author Information

Andrea DellAmico, andrea.dellamico@isti.cnr.it