diff --git a/roles/execute_binary_upgrade/defaults/main.yml b/roles/execute_binary_upgrade/defaults/main.yml index acce8839..02de450f 100644 --- a/roles/execute_binary_upgrade/defaults/main.yml +++ b/roles/execute_binary_upgrade/defaults/main.yml @@ -37,8 +37,8 @@ pg_replication_user: "repuser" pg_replication_user_password: "" synchronous_standby_names: "" standby_quorum_type: "any" -pg_basebackup: "{{ new_pg_bin_path }}/pg_basebackup -Fp -R -l standby --checkpoint=fast --wal-method=stream" -pg_basebackup_options: "" +new_pg_basebackup: "{{ new_pg_bin_path }}/pg_basebackup -Fp -R -l standby --checkpoint=fast --wal-method=stream" +new_pg_basebackup_options: "" # setting validate_only to true allows you to validate setup on an existing node # use_validation flag applies to deployment configuration and validation after setup diff --git a/roles/execute_binary_upgrade/tasks/upgrade_standbys.yml b/roles/execute_binary_upgrade/tasks/upgrade_standbys.yml index 28c799ac..9e8558b5 100644 --- a/roles/execute_binary_upgrade/tasks/upgrade_standbys.yml +++ b/roles/execute_binary_upgrade/tasks/upgrade_standbys.yml @@ -16,6 +16,12 @@ become: true when: "'standby' in group_names" +# if not defined here, it will not include the new_pg_version and new_pg_bin_path variables in pg_basebackup +- name: Set fact for pg_basebackup options + ansible.builtin.set_fact: + pg_basebackup: "{{ new_pg_basebackup }}" + pg_basebackup_options: "{{ new_pg_basebackup_options }}" + - name: Include setup_replication role for standby's when not use_link_method ansible.builtin.include_role: name: setup_replication @@ -30,9 +36,6 @@ pg_initdb: "{{ new_pg_initdb }}" pg_initdb_options: "{{ new_pg_initdb_options }}" pg_port: "{{ new_pg_port }}" - pg_basebackup: "{{ pg_basebackup }}" - pg_basebackup_options: "{{ pg_basebackup_options }}" use_validation: false no_log: "{{ disable_logging }}" when: "'standby' in group_names" -