Skip to content

InformaticsMatters/postgresql-ansible

Repository files navigation

PostgreSQL Orchestration (Ansible)

lint

GitHub tag (latest SemVer)

CodeFactor

A playbook and Role to deploy PosgreSQL, suitable for execution by AWX.

This project contains one Ansible role:-

  • postgresql

Note: The Role is designed to be executed from within our AWX server where credentials for the cluster (Kubernetes) reside. If you're not running from AWX (discouraged) then you will need to provide values for the variables that would be injected by AWX.

As with all of our playbooks you can find the common user-defined variables in the role's defaults/main.yaml and less common variables in vars/main.yaml.

You will need a node in your cluster with the label informaticsmatters.com/purpose=core as the Pod will require this label during scheduling.

Adding an auxiliary user

As well as the 'standard' postgres user you can optionally also create a second (auxiliary) user with a database and optional super-user privileges using the pg_aux parameters (see roles/postgresql/defaults/main.yaml).

Fine-tuning postgres with configuration

You can configure any additional database parameters using the playbook variable pg_configuration.