]>
Commit | Line | Data |
---|---|---|
d0bc90e0 | 1 | --- |
99504fed TH |
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 | ||
d0bc90e0 P |
14 | - name: Copy secondary script |
15 | template: src=standby-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755 | |
16 | ||
17 | - name: Copy rsync password file | |
18 | copy: | |
19 | content: "{{ barman_rsync_password }}" | |
20 | dest: /var/lib/postgresql/.rsync_pass | |
21 | owner: postgres | |
22 | group: postgres | |
23 | mode: 0400 | |
24 | no_log: True | |
c95984df | 25 | when: postgres_barman_rsync_enabled |