Skip to content

Commit 1b6737b

Browse files
authored
Merge pull request #32 from sap-linuxlab/dev
Stage changes to main
2 parents e247f47 + f728d6b commit 1b6737b

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

plugins/modules/sap_facts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

roles/sap_control/tasks/functions/restart_sapstartsrv.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
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

roles/sap_control/tasks/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,17 @@
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

roles/sap_control/tasks/prepare.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
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"

0 commit comments

Comments
 (0)