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(){
286
286
# $3 - NR
287
287
288
288
# # 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)
290
290
291
291
if [[ $SAPSTARTSRV = 0 ]]; then
292
292
# # No sapstartsrv process running - attempt to start
Original file line number Diff line number Diff line change 33
33
register : sap_start_sapstartsrv
34
34
35
35
- 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 87
87
# Get SAP Facts
88
88
- name : Run sap_facts module to gather SAP facts
89
89
community.sap_libs.sap_system_facts :
90
- param : " {{ sap_facts_param }}"
90
+ # param: "{{ sap_facts_param }}"
91
91
register : sap_facts_register
92
92
93
- - name : Debug facts
93
+ - name : Debug result from sap_libs.sap_system_facts
94
94
ansible.builtin.debug :
95
- msg : " {{ sap_facts_register.sap_facts }}"
95
+ msg : " {{ sap_facts_register.ansible_facts.sap }}"
96
+ verbosity : 1
96
97
97
98
- name : pause for 10 Seconds
98
- ansible.builtin.pause :
99
- seconds : 10
99
+ ansible.builtin.wait_for :
100
+ timeout : 10
100
101
101
102
# Debugging stuff
102
103
- name : Display parameters for runtime
Original file line number Diff line number Diff line change 13
13
vars :
14
14
sap_control_execute_sid : " {{ item.SID }}"
15
15
sap_control_execute_type : " {{ item.Type }}"
16
- sap_control_execute_instance_nr : " {{ item.InstanceNumber }}"
16
+ sap_control_execute_instance_nr : " {{ item.NR }}"
17
17
sap_control_execute_instance_type : " {{ item.InstanceType }}"
18
18
ansible.builtin.include_tasks : " sapcontrol.yml"
19
- loop : " {{ sap_facts_register.sap_facts }}"
19
+ loop : " {{ sap_facts_register.ansible_facts.sap }}"
20
20
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