diff --git a/ansible/playbooks/tasks/azure-cluster-hana.yaml b/ansible/playbooks/tasks/azure-cluster-hana.yaml index 5813d82..fc65625 100644 --- a/ansible/playbooks/tasks/azure-cluster-hana.yaml +++ b/ansible/playbooks/tasks/azure-cluster-hana.yaml @@ -98,7 +98,11 @@ AUTOMATED_REGISTER="false" when: hana_resource | length == 0 -- name: Create HANA resource clone +- name: Gather the package facts to check cloud-regionsrv-client in 15sp2 + ansible.builtin.package_facts: + manager: auto + +- name: Create HANA resource clone [deprecated - <15sp4] ansible.builtin.command: cmd: >- crm configure ms @@ -111,7 +115,27 @@ target-role="Started" interleave="true" maintenance="true" - when: hana_clone | length == 0 + when: + - hana_clone | length == 0 + - ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '<') + +- name: Create HANA resource clone [non-deprecated - >=15sp4] + ansible.builtin.command: + cmd: >- + crm configure clone + msl_SAPHanaCtl_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }} + {{ rsc_saphanactl }} + meta + notify="true" + clone-max="2" + clone-node-max="1" + target-role="Started" + interleave="true" + maintenance="true" + promotable="true" + when: + - hana_clone | length == 0 + - ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '>=') - name: Validate cluster IP vars: @@ -158,7 +182,7 @@ {{ rsc_socat }} when: ip_grp | length == 0 -- name: Configure hana/IP colocation +- name: Configure hana/IP colocation [deprecated - <15sp4] ansible.builtin.command: cmd: >- crm configure colocation @@ -166,7 +190,21 @@ 4000: g_ip_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }}:Started msl_SAPHanaCtl_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }}:Master - when: ip_colo | length == 0 + when: + - ip_colo | length == 0 + - ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '<') + +- name: Configure hana/IP colocation [non-deprecated - >=15sp4] + ansible.builtin.command: + cmd: >- + crm configure colocation + col_saphana_ip_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }} + 4000: + g_ip_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }}:Started + msl_SAPHanaCtl_{{ sap_hana_install_sid }}_HDB{{ sap_hana_install_instance_number }}:Promoted + when: + - ip_colo | length == 0 + - ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '>=') - name: Configure order ansible.builtin.command: