vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

Automate 'archive_command' configuration for pgBackRest and WAL-G #394

Closed vitabaks closed 1 year ago

vitabaks commented 1 year ago

This PR introduces an Ansible task that automates the configuration of the 'archive_command' for pgBackRest and WAL-G.

pgBackRest

Ensure that 'archive_command' is set to the value of 'pgbackrest_archive_command'. This operation is performed only when 'pgbackrest_install' is defined and set to true, and 'archive_command' is undefined or its value is not equal to 'pgbackrest_archive_command' variable.

WAL-G

Ensure that 'archive_command' is set to the value of 'wal_g_archive_command'. This operation is performed only when 'wal_g_install' is defined and set to true, and 'archive_command' is undefined or its value is not equal to 'wal_g_archive_command' variable.

New variables