This role installs and configures a PostgreSQL server. It allows to set all configuration variables supported by PostgreSQL.
This role also makes PostgreSQL comply more to the FHS. This is accomplished by moving configuration to /etc, logs to /var/log, and the databases to /var/lib.
Debian 11 (Bullseye)
This role seriously has a ton of variables.
Instead of copying the defaults file here, look it up there.
All variables from postgresql.conf are called exactly like they are called in the file but with postgres_
prepended.
Name | Default/Required | Description |
---|---|---|
postgres_initdb |
initdb |
Path to the initdb executable. On Ubuntu, the default value is automatically discovered. |
postgres_home_directory |
/var/lib/postgresHome |
Path to the home of the postgres user |
postgres_users |
[] |
List of dicts of postgresql_user parameters |
postgres_dbs |
[] |
List of dicts of postgresql_db parameters |
Name | Default/Required | Description |
---|---|---|
password |
The password to set | |
privileges |
The privileges to set |
None
- hosts: postgres
roles:
- role: postgresql
postgres_users:
- name: synapse
password: TODO-change-me
postgres_dbs:
- name: synapse
encoding: UTF8
lc_collate: C
lc_ctype: C
template: template0
owner: synapse
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.