diff options
Diffstat (limited to 'tasks/postgres-standby-barman.yml')
-rw-r--r-- | tasks/postgres-standby-barman.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tasks/postgres-standby-barman.yml b/tasks/postgres-standby-barman.yml index 65e87a6..6a94b75 100644 --- a/tasks/postgres-standby-barman.yml +++ b/tasks/postgres-standby-barman.yml | |||
@@ -1,4 +1,16 @@ | |||
1 | --- | 1 | --- |
2 | - name: Compute barman remote URL | ||
3 | set_fact: | ||
4 | barman_remote_url: "{{ scheme }}{{ user }}{{ server }}{{ delimiter }}{{ path }}" | ||
5 | rsync_options: "{{ postgres_barman_rsync_options | default('') }}{{ rsync_password_file }}" | ||
6 | vars: | ||
7 | scheme: "{{ postgres_barman_rsync_enabled | ternary('rsync://', '') }}" | ||
8 | user: "{{ postgres_barman_remote_user is defined | ternary(postgres_barman_remote_user + '@', '') }}" | ||
9 | server: "{{ postgres_barman_server }}" | ||
10 | delimiter: "{{ postgres_barman_rsync_enabled | ternary('', ':')}}" | ||
11 | path: "{{ postgres_barman_path_prefix | default('~') }}" | ||
12 | rsync_password_file: "{{ postgres_barman_rsync_enabled | ternary(' --password-file=/var/lib/postgresql/.rsync_pass ', '') }}" | ||
13 | |||
2 | - name: Copy secondary script | 14 | - name: Copy secondary script |
3 | template: src=standby-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755 | 15 | template: src=standby-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755 |
4 | 16 | ||