debops.postgresql default variables

PostgreSQL installation, packages

postgresql__upstream

Enable PostgreSQL Global Developmet Group APT repository? More information: https://wiki.postgresql.org/wiki/Apt

postgresql__upstream: False
postgresql__upstream_key_id

The GPG fingerprint of the upstream APT repository key.

postgresql__upstream_key_id: 'B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'
postgresql__upstream_apt_repo

The upstream APT repository URL in the sources.list format.

postgresql__upstream_apt_repo: 'deb http://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main'
postgresql__base_packages

List of base PostgreSQL packages to install.

postgresql__base_packages: [ 'postgresql-client' ]
postgresql__python_packages

List of Python packages to install with PostgreSQL.

postgresql__python_packages: [ 'python-psycopg2' ]
postgresql__packages

Install additional packages with PostgreSQL.

postgresql__packages: []
postgresql__preferred_version

Specify preferred version of the PostgreSQL packages to install. Only makes sense when multiple PostgreSQL versions are available as APT packages, for example when the upstream APT repository is enabled. See the postgresql__preferred_version for more details.

postgresql__preferred_version: ''
postgresql__user

PostgreSQL user account to which Ansible will switch to perform database-related operations. Should be the same on local and remote database servers.

postgresql__user: 'postgres'
postgresql__server

FQDN hostname of the remote PostgreSQL server to use. Role detects if a local server is available and uses it automatically.

postgresql__server: '{{ ansible_local.postgresql.server
                        if (ansible_local|d() and ansible_local.postgresql|d() and
                            ansible_local.postgresql.server|d() and
                            ansible_local.postgresql.server != "localhost")
                        else "" }}'
postgresql__port

Default port number of the PostgreSQL server to use (local or remote).

postgresql__port: '5432'
postgresql__delegate_to

FQDN hostname of the host that will execute Ansible tasks related to the PostgreSQL database and role management. If PostgreSQL server is available locally, host will delegate the tasks to itself automatically.

postgresql__delegate_to: '{{ postgresql__server
                             if (postgresql__server|d() and
                                 (postgresql__server != "localhost" or not postgresql__server))
                             else ansible_fqdn }}'
postgresql__password_length

Length of the randomly generated passwords in PostgreSQL database.

postgresql__password_length: '64'
postgresql__password_characters

Characters allowed in the randomly generated passwords in PostgreSQL database.

postgresql__password_characters: 'ascii,digits,.-_~!&()*;='

pg_wrapper integration

postgresql__default_database

Name of the database the users should connect to, set as default in /etc/postgresql-common/user_clusters. If the name is *, users will connect to the database with the same name as their login.

postgresql__default_database: '*'
postgresql__default_user_clusters

Default entry specified in /etc/postgresql-common/user_clusters, used by pg_wrapper script to direct users to correct PostgreSQL server. See postgresql__user_clusters for more details.

postgresql__default_user_clusters:

  - user: '*'
    group: '*'
    cluster: '{{ (postgresql__server + ":" + postgresql__port)
                  if (postgresql__server|d() and postgresql__server)
                  else "main" }}'
    database: '{{ postgresql__default_database }}'
postgresql__user_clusters

Custom user/cluster mappings stored in /etc/postgresql-common/user_clusters. See postgresql__user_clusters for more details.

postgresql__user_clusters: []

PostgreSQL roles and databases

postgresql__roles

List of PostgresSQL roles, specified as YAML dicts. See postgresql__roles for more details.

postgresql__roles: []
postgresql__dependent_roles

List of PostgreSQL roles, specified as YAML dicts by other Ansible roles via dependency variables. See postgresql__roles for more details.

postgresql__dependent_roles: []
postgresql__groups

List of PostgreSQL role groups, specified as YAML dicts. See postgresql__groups for more details.

postgresql__groups: []
postgresql__dependent_groups

List of PostgreSQL role groups, specified as YAML dicts by other roles via dependency variables. See postgresql__groups for more details.

postgresql__dependent_groups: []
postgresql__databases

List of PostgreSQL databases, specified as YAML dicts. See postgresql__databases for more details.

postgresql__databases: []
postgresql__dependent_databases

List of PostgreSQL databases, specified as a YAML dicts, defined by other roles via dependency variables. See postgresql__databases for more details.

postgresql__dependent_databases: []
postgresql__extensions

List of PostgreSQL extensions enabled in specific databases, each extension specified as a YAML dict. See postgresql__extensions for more details.

postgresql__extensions: []
postgresql__dependent_extensions

List of PostgreSQL extensions enabled in specific databases, each extension specified as a YAML dict. This list can be used by other roles via dependency variables. See postgresql__extensions for more details.

postgresql__dependent_extensions: []
postgresql__pgpass

List of role/password mappings stored in user directories in ~/.pgpass configuration file. See postgresql__pgpass for more details.

postgresql__pgpass: []
postgresql__dependent_pgpass

List of role/password mappings stored in user directories in ~/.pgpass configuration file, defined by other roles via dependency variables. See postgresql__pgpass for more details.

postgresql__dependent_pgpass: []

Role-dependent configuration

postgresql__apt_preferences__dependent_list

Configuration for debops.apt_preferences role. PostgreSQL from backports will be preferred on specified Debian releases.

postgresql__apt_preferences__dependent_list:

  - package: 'postgresql postgresql-* libpq5'
    backports: [ 'wheezy' ]
    reason: 'Version parity with Debian Jessie'
    role: 'debops.postgresql'