aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/postgres-pgupgrades.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/postgres-pgupgrades.yml')
-rw-r--r--tasks/postgres-pgupgrades.yml13
1 files changed, 12 insertions, 1 deletions
diff --git a/tasks/postgres-pgupgrades.yml b/tasks/postgres-pgupgrades.yml
index a0b17b4..6eb9cb7 100644
--- a/tasks/postgres-pgupgrades.yml
+++ b/tasks/postgres-pgupgrades.yml
@@ -1,7 +1,18 @@
1--- 1---
2- set_fact:
3 postgres_dbname: "{{ postgres_pgupgrade.dbname }}"
4 postgres_pgbouncer_uri: "{{ postgres_pgupgrade.pgbouncer_uri|default(None) }}"
5 postgres_old_cluster_version: "{{ postgres_pgupgrade.old_cluster_version }}"
6 postgres_old_cluster_name: "{{ postgres_pgupgrade.old_cluster_name }}"
7 postgres_new_cluster_version: "{{ postgres_pgupgrade.new_cluster_version }}"
8 postgres_new_cluster_name: "{{ postgres_pgupgrade.new_cluster_name }}"
9 postgres_standby_server: "{{ postgres_pgupgrade.standby_server }}"
10 postgres_standby_old_cluster_name: "{{ postgres_pgupgrade.standby_old_cluster_name|default(postgres_pgupgrade.old_cluster_name) }}"
11 postgres_standby_new_cluster_name: "{{ postgres_pgupgrade.standby_new_cluster_name|default(postgres_pgupgrade.new_cluster_name) }}"
12
2- name: Find matching new cluster 13- name: Find matching new cluster
3 set_fact: 14 set_fact:
4 postgres_new_cluster: "{{ postgres_clusters|selectattr('name','equalto',postgres_new_cluster_name)|selectattr('version','equalto',postgres_new_cluster_version|float)|list|first }}" 15 postgres_new_cluster: "{{ postgres_clusters|selectattr('name','equalto',postgres_new_cluster_name)|selectattr('version','equalto', postgres_new_cluster_version|float)|list|first }}"
5 16
6- name: Extract database port of new matching cluster 17- name: Extract database port of new matching cluster
7 set_fact: 18 set_fact: