aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/postgres-cluster.yml6
-rw-r--r--tasks/postgres-standby-barman.yml4
-rw-r--r--tasks/postgres-standby-basebackup.yml4
3 files changed, 11 insertions, 3 deletions
diff --git a/tasks/postgres-cluster.yml b/tasks/postgres-cluster.yml
index a8e96c1..4f62d31 100644
--- a/tasks/postgres-cluster.yml
+++ b/tasks/postgres-cluster.yml
@@ -60,7 +60,11 @@
60 60
61- name: Add standby clone from barman script 61- name: Add standby clone from barman script
62 include: postgres-standby-barman.yml 62 include: postgres-standby-barman.yml
63 when: postgres_barman_server is defined 63 when: postgres_barman_server is defined and postgres_primary.restore_barman_directory is defined
64
65- name: Add standby clone from pg_basebackup
66 include: postgres-standby-basebackup.yml
67 when: postgres_primary and postgres_primary.pg_basebackup is defined
64 68
65- name: Determine SSD or rotational disks 69- name: Determine SSD or rotational disks
66 raw: 'lsblk --noheadings --nodeps --raw --output=rota | grep -q 1' 70 raw: 'lsblk --noheadings --nodeps --raw --output=rota | grep -q 1'
diff --git a/tasks/postgres-standby-barman.yml b/tasks/postgres-standby-barman.yml
index 6a94b75..fb71d32 100644
--- a/tasks/postgres-standby-barman.yml
+++ b/tasks/postgres-standby-barman.yml
@@ -11,8 +11,8 @@
11 path: "{{ postgres_barman_path_prefix | default('~') }}" 11 path: "{{ postgres_barman_path_prefix | default('~') }}"
12 rsync_password_file: "{{ postgres_barman_rsync_enabled | ternary(' --password-file=/var/lib/postgresql/.rsync_pass ', '') }}" 12 rsync_password_file: "{{ postgres_barman_rsync_enabled | ternary(' --password-file=/var/lib/postgresql/.rsync_pass ', '') }}"
13 13
14- name: Copy secondary script 14- name: Copy secondary barman clone script
15 template: src=standby-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755 15 template: src=standby-barman-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755
16 16
17- name: Copy rsync password file 17- name: Copy rsync password file
18 copy: 18 copy:
diff --git a/tasks/postgres-standby-basebackup.yml b/tasks/postgres-standby-basebackup.yml
new file mode 100644
index 0000000..db52d55
--- /dev/null
+++ b/tasks/postgres-standby-basebackup.yml
@@ -0,0 +1,4 @@
1---
2- name: Copy secondary pg_basebackup clone script
3 template: src=standby-pg_basebackup-clone.sh.j2 dest=/root/standby-clone-{{ postgres_version }}-{{ postgres_cluster_name }}.sh mode=0755
4 no_log: true