diff options
author | Théophile Helleboid - chtitux <chtitux@gmail.com> | 2020-06-05 13:40:43 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 13:40:43 +0400 |
commit | 9e6f9658fbf5db657a2dd8465bf0ae4f41da161e (patch) | |
tree | 0e7e023c1b7f580db314c78bf3b65b70563efcc7 /templates/recovery.conf.j2 | |
parent | ebe451adda84672f9872187164df279dbfed7a35 (diff) | |
parent | 587f87bbf278a80b14a182146724a9ebf1fd98a2 (diff) | |
download | ansible-postgresql-role-9e6f9658fbf5db657a2dd8465bf0ae4f41da161e.tar.gz ansible-postgresql-role-9e6f9658fbf5db657a2dd8465bf0ae4f41da161e.tar.zst ansible-postgresql-role-9e6f9658fbf5db657a2dd8465bf0ae4f41da161e.zip |
Merge pull request #13 from paulRbr/optional-restore-command
recovery: optional restore_command & allow custom command if needed
Diffstat (limited to 'templates/recovery.conf.j2')
-rw-r--r-- | templates/recovery.conf.j2 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/recovery.conf.j2 b/templates/recovery.conf.j2 index 059b234..7078429 100644 --- a/templates/recovery.conf.j2 +++ b/templates/recovery.conf.j2 | |||
@@ -2,7 +2,11 @@ | |||
2 | # {{ ansible_managed }} | 2 | # {{ ansible_managed }} |
3 | 3 | ||
4 | standby_mode = 'on' | 4 | standby_mode = 'on' |
5 | restore_command = '/usr/bin/barman-wal-restore --user barman --parallel 8 {{ postgres_barman_server }} {{ postgres_primary.restore_directory }} %f %p' | 5 | {% if postgres_primary.restore_command is defined %} |
6 | restore_command = '{{ postgres_primary.restore_command }}' | ||
7 | {% elif postgres_primary.restore_barman_directory is defined %} | ||
8 | restore_command = '/usr/bin/barman-wal-restore --user barman --parallel 8 {{ postgres_barman_server }} {{ postgres_primary.restore_barman_directory }} %f %p' | ||
9 | {% endif %} | ||
6 | primary_conninfo = 'host={{ postgres_primary.host }} port={{ postgres_primary.port }} user={{ postgres_primary.replication_user }} password={{ postgres_primary.replication_password }} sslmode=require' | 10 | primary_conninfo = 'host={{ postgres_primary.host }} port={{ postgres_primary.port }} user={{ postgres_primary.replication_user }} password={{ postgres_primary.replication_password }} sslmode=require' |
7 | trigger_file = '/var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/failover.trigger' | 11 | trigger_file = '/var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/failover.trigger' |
8 | recovery_target_timeline='latest' | 12 | recovery_target_timeline='latest' |