File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed
Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ function check_sapstartsrv(){
286286 # $3 - NR
287287
288288 # # Count the number of sapstartsrv processes
289- SAPSTARTSRV=$( ps -ef | grep $2 | grep $3 | grep sapstartsrv | wc -l)
289+ SAPSTARTSRV=$( ps -eo exe | grep $2 | grep $3 | grep sapstartsrv | wc -l)
290290
291291 if [[ $SAPSTARTSRV = 0 ]]; then
292292 # # No sapstartsrv process running - attempt to start
Original file line number Diff line number Diff line change 3333 register : sap_start_sapstartsrv
3434
3535- name : SAPstartsrv - Wait for 10 seconds for sapstartsrv to initialize
36- ansible.builtin.pause :
37- seconds : 10
36+ ansible.builtin.wait_for :
37+ timeout : 10
Original file line number Diff line number Diff line change 8787# Get SAP Facts
8888- name : Run sap_facts module to gather SAP facts
8989 community.sap_libs.sap_system_facts :
90- param : " {{ sap_facts_param }}"
90+ # param: "{{ sap_facts_param }}"
9191 register : sap_facts_register
9292
93- - name : Debug facts
93+ - name : Debug result from sap_libs.sap_system_facts
9494 ansible.builtin.debug :
95- msg : " {{ sap_facts_register.sap_facts }}"
95+ msg : " {{ sap_facts_register.ansible_facts.sap }}"
96+ verbosity : 1
9697
9798- name : pause for 10 Seconds
98- ansible.builtin.pause :
99- seconds : 10
99+ ansible.builtin.wait_for :
100+ timeout : 10
100101
101102# Debugging stuff
102103- name : Display parameters for runtime
Original file line number Diff line number Diff line change 1313 vars :
1414 sap_control_execute_sid : " {{ item.SID }}"
1515 sap_control_execute_type : " {{ item.Type }}"
16- sap_control_execute_instance_nr : " {{ item.InstanceNumber }}"
16+ sap_control_execute_instance_nr : " {{ item.NR }}"
1717 sap_control_execute_instance_type : " {{ item.InstanceType }}"
1818 ansible.builtin.include_tasks : " sapcontrol.yml"
19- loop : " {{ sap_facts_register.sap_facts }}"
19+ loop : " {{ sap_facts_register.ansible_facts.sap }}"
2020 when :
21- - " item.Type == sap_type"
21+ - " item.InstanceType | lower == sap_type | lower "
You can’t perform that action at this time.
0 commit comments