Ansible role to install and configure the PostgreSQL database on RHEL/CentOS 7 systems using the PostgreSQL Red Hat/CentOS Software Collection.
NOTE: This version of the role only supports installing PostgreSQL 10.
Main features:
- Installs PostgreSQL from Red Hat/CentOS Software Collection.
- Upgrades PostgreSQL from a previous version if it was installed as a
Software Collection. For supported versions to upgrade from, see the
postgresql_upgrade_ids
list invars/main.yml
. - Can install PostgreSQL Software Collection as the system-installed PostgreSQL using the syspaths package.
This role requires Ansible 2.4 or higher.
Name | Type | Description | Default |
---|---|---|---|
postgresql_conf_listen_addresses |
string | Comma-separeted list of IP addresses to listen on. NOTE: Use |
"*" |
postgresql_conf_password_encryption |
string | Algorithm to use when encrypting passwords. Available options are:
|
scram-sha-256 |
postgresql_conf_hba_local |
dict | Dictionary specifying authentication
methods for local connections in
It must contain three keys controlling different types of local connections:
Each key's value must specify a valid authentication method for its connection type. For a list of possible authentication methods, read the documentation on pg_hba.conf file. |
unix_socket: peer
ipv4: ident
ipv6: ident |
postgresql_conf_hba_custom |
list | List specifying custom records in the
Each entry is a dictionary of the form: description: string
conn_type: string
database: string
user: string
address: string
method: string where For a detailed description of each configuration parameter, read the documentation on pg_hba.conf file. |
[] |
postgresql_local_enabled |
boolean | Specifies whether to install PostgreSQL server packages and configuration. | true |
postgresql_install_syspaths |
boolean | Specifies whether to install PostgreSQL Software Collection as the system-installed PostgreSQL using the syspaths package. | true |
postgresql_rhel_rhscl_repo |
boolean | Name of the Red Hat Software Collections repository. | rhel-server-rhscl-7-rpms |
Name | Type | Description |
---|---|---|
postgresql_major_version |
string | Major PostgreSQL version of the current PostgreSQL Software Collection. |
postgresql_scl_name |
string | Name of the current PostgreSQL Software Collection. |
postgresql_package_name |
string | Name of the main RPM package. |
postgresql_unit_name |
string | Name of the systemd unit. |
postgresql_data_dir |
string | Path to PostgreSQL's data directory. |
postgresql_bin_dir |
string | Path to PostgreSQL Software Collection's binaries directory. |
postgresql_setup_command |
boolean | Path to PostgreSQL's setup command. |
postgresql_scl_enable_command |
boolean | Software Collection's scl enable
command. |
postgresql_upgrade_ids |
list | List of previous PostgreSQL Software Collections from which it is possible to upgrade to the current PostgreSQL Software Collection. |
None.
- hosts: all
roles:
- genialis.postgresql
GPLv3
Tadej Janež