Skip to content

Commit

Permalink
Test use_sbd as a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagot committed Oct 13, 2023
1 parent bbd73a3 commit 97b3134
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/sap-hana-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# is_primary is selected so that tasks that need to be issued one are honoured correctly
is_primary: "{{ ansible_play_hosts[0] == inventory_hostname }}"
primary_hostname: "{{ ansible_play_hosts[0] }}"
use_sbd: yes
sbd: "{{ use_sbd | default('true') }}"
# Azure fencing specific vars
subscription_id:
resource_group:
Expand Down
6 changes: 5 additions & 1 deletion ansible/playbooks/tasks/cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,15 @@
migration_threshold: "{{ (crm_rsc_options_show.stdout | regex_search('migration-threshold=([0-9]*)', '\\1'))[0] | default('false') }}"
op_default_timeout: "{{ (crm_op_options_show.stdout | regex_search('timeout=([0-9]*)', '\\1'))[0] | default('false') }}"

- name: Variable use_sbd
ansible.builtin.debug:
msg: "Cloud platform appears to be use_sbd:{{ use_sbd }} use_sbd bool:{{ use_sbd | bool }} use_sbd string:{{ use_sbd | string | lower == 'false' }}"

- name: Enable SBD [sbd]
ansible.builtin.command: crm configure primitive rsc_iscsi_sbd stonith:external/sbd
when:
- sbd_stonith | string | lower == 'false'
- use_sbd
- use_sbd | bool
- is_primary

- name: Set stonith-timeout [sdb]
Expand Down

0 comments on commit 97b3134

Please sign in to comment.