File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- - name : SAP Hana system replication hoks
2+ - name : SAP Hana system replication hooks
33 hosts : hana
44 remote_user : cloudadmin
55 become : true
Original file line number Diff line number Diff line change 159159 state : link
160160 when : ansible_distribution_major_version == '16'
161161
162+ - name : Gather crmsh package facts
163+ ansible.builtin.package_facts :
164+ manager : auto
165+
166+ - name : Set crmsh transport flag
167+ ansible.builtin.set_fact :
168+ crmsh_transport_flag : " {{ '--transport udpu' if ansible_facts.packages['crmsh'][0].version is version('5.0.0', '>=') else '-u' }}"
169+
162170- name : Softfail for old cloud-regionsrv-client in 15sp2
163171 ansible.builtin.debug :
164172 msg :
176184 sbd_paths : " {{ sbd_slurp['content'] | b64decode | regex_findall('SBD_DEVICE=(.+)') | last }}"
177185 when : use_sbd | default(false) | bool
178186
179- - name : Create the cluster on primary [sbd]
180- ansible.builtin.command :
181- cmd : >-
187+ - name : Set crm cluster init command
188+ ansible.builtin.set_fact :
189+ crm_cluster_init_cmd : >-
182190 crm cluster init
183191 -y
184192 -n qe-cluster
185- -s {{ sbd_paths }}
186- -w softdog
187193 -i eth0
188- -u
189- creates : /etc/corosync/corosync.conf
190- when :
191- - is_primary
192- - use_sbd | default(false) | bool
194+ {{ crmsh_transport_flag }}
195+ {{ '-s ' + sbd_paths + ' -w softdog' if use_sbd | default(false) | bool else '' }}
193196
194- - name : Create the cluster on primary [azure fencing]
197+ - name : Create the cluster on primary
195198 ansible.builtin.command :
196- cmd : >-
197- crm cluster init
198- -y
199- -n qe-cluster
200- -i eth0
201- -u
199+ cmd : " {{ crm_cluster_init_cmd }}"
202200 creates : /etc/corosync/corosync.conf
203- when :
204- - is_primary
205- - not (use_sbd | default(false) | bool)
201+ when : is_primary
206202
207203# check crm status
208204- name : Check the cluster on primary
You can’t perform that action at this time.
0 commit comments