From 7a58a22f6bf78cab7b2d36f73508d116c00b762e Mon Sep 17 00:00:00 2001 From: Frank Ketelaars Date: Tue, 17 Oct 2023 19:28:35 +0000 Subject: [PATCH] #559 Db2 instance provisioning fails --- .../cp4d/cp4d-cluster-configure/tasks/main.yml | 6 ++++++ .../tasks/provision_db2_instance.yml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-cluster-configure/tasks/main.yml b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-cluster-configure/tasks/main.yml index 06d0bfc93..8d11fb1aa 100644 --- a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-cluster-configure/tasks/main.yml +++ b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-cluster-configure/tasks/main.yml @@ -3,6 +3,12 @@ debug: msg: "Handling configuration for CP4D cluster {{ current_cp4d_cluster.project }}" +- name: Switch to the correct olm-utils version + include_role: + name: cp4d-switch-olm-utils + vars: + _p_current_cp4d_cluster: "{{ current_cp4d_cluster }}" + - include_role: name: cp4d-variables vars: diff --git a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml index 14f4f0dc6..9f8d499cf 100644 --- a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml +++ b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml @@ -40,7 +40,7 @@ return_content: yes validate_certs: no status_code: 200 - register: _databases_details_result + register: _databases_details_result_v1 when: current_cp4d_cluster.cp4d_version < '4.7.0' - name: Get CP4D Database specifications @@ -53,7 +53,15 @@ return_content: yes validate_certs: no status_code: 200 - register: _databases_details_result + register: _databases_details_result_v2 + when: current_cp4d_cluster.cp4d_version >= '4.7.0' + + - set_fact: + _databases_details_result: "{{ _databases_details_result_v1 }}" + when: current_cp4d_cluster.cp4d_version < '4.7.0' + + - set_fact: + _databases_details_result: "{{ _databases_details_result_v2 }}" when: current_cp4d_cluster.cp4d_version >= '4.7.0' - debug: