mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2025-06-29 02:53:07 +00:00
refactor and fix pitr
This commit is contained in:
@ -60,9 +60,12 @@ bootstrap:
|
||||
command: {{ patroni_restore_script }}
|
||||
no_params: True
|
||||
recovery_conf:
|
||||
recovery_target_action: promote
|
||||
recovery_target_timeline: {{ patroni_wal_g_pitr }}
|
||||
restore_command: {{ patroni_cluster_restore_command }}
|
||||
recovery_target_action: {{ patroni_recovery_target_action }}
|
||||
recovery_target_timeline: {{ patroni_recovery_target_timeline }}
|
||||
{% if patroni_wal_g_pitr | length > 0 %}
|
||||
recovery_target_time: {{ patroni_wal_g_pitr }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if patroni_cluster_bootstrap_method == 'pg_probackup' %}
|
||||
pg_probackup:
|
||||
@ -97,12 +100,12 @@ bootstrap:
|
||||
use_slots: true
|
||||
parameters: {{ patroni_postgresql_parameters_combined }}
|
||||
|
||||
initdb: # List options to be passed on to initdb
|
||||
initdb:
|
||||
- encoding: {{ patroni_postgresql_encoding }}
|
||||
- locale: {{ patroni_postgresql_locale }}
|
||||
- data-checksums
|
||||
|
||||
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
|
||||
pg_hba:
|
||||
{% if patroni_ssl|bool %}
|
||||
{% for host in groups[patroni_play_group] %}
|
||||
- hostssl all all {{ hostvars[host]['ansible_host'] }}/32 {{ patroni_postgresql_password_encryption_algorithm }}
|
||||
@ -121,7 +124,6 @@ bootstrap:
|
||||
- hostssl all all 0.0.0.0/0 {{ patroni_postgresql_password_encryption_algorithm }}
|
||||
- host replication replicator 0.0.0.0/0 {{ patroni_postgresql_password_encryption_algorithm }}
|
||||
|
||||
|
||||
postgresql:
|
||||
listen: 0.0.0.0:{{ patroni_postgresql_port }}
|
||||
connect_address: {{ hostvars[inventory_hostname]['ansible_host'] }}:{{ patroni_postgresql_port }}
|
||||
|
Reference in New Issue
Block a user