Skip to content

Commit

Permalink
Merge pull request #308 from BillAnastasiadis/sp7depr
Browse files Browse the repository at this point in the history
Replace pacemaker deprecated commands for Azure
  • Loading branch information
BillAnastasiadis authored Jan 22, 2025
2 parents dfc8f86 + 7ca8d60 commit 4bfbdbb
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ansible/playbooks/tasks/azure-cluster-hana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@
migration_threshold: "{{ (crm_conf_show.stdout | regex_search('migration-threshold=([0-9]*)', '\\1'))[0] }}"
changed_when: false

- name: Gather package facts
ansible.builtin.package_facts:
manager: auto

- name: Set variables for clone command and promoted term
set_fact:
clone_command: >-
{{ 'ms' if ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '<')
else 'clone' }}
promoted_term: >-
{{ 'Master' if ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '<')
else 'Promoted' }}
- name: Ensure maintenance mode is active
ansible.builtin.command:
cmd: crm maintenance on
Expand Down Expand Up @@ -134,7 +147,7 @@
- name: Create HANA resource clone
ansible.builtin.command:
cmd: >-
crm configure ms
crm configure {{ clone_command }}
{{ ms_saphanactl }}
{{ rsc_saphanactl }}
meta
Expand All @@ -144,6 +157,7 @@
target-role="Started"
interleave="true"
maintenance="true"
{% if clone_command == 'clone' %}promotable="true"{% endif %}
when: hana_clone | length == 0

- name: Create HANA Filesystem resource
Expand Down Expand Up @@ -234,7 +248,7 @@
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
{{ ms_saphanactl }}:Master
{{ ms_saphanactl }}:{{ promoted_term }}
when: ip_colo | length == 0

- name: Configure order
Expand Down

0 comments on commit 4bfbdbb

Please sign in to comment.