Skip to content

Stage changes to main #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/modules/sap_facts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function check_sapstartsrv(){
# $3 - NR

## Count the number of sapstartsrv processes
SAPSTARTSRV=$(ps -ef | grep $2 | grep $3 | grep sapstartsrv | wc -l)
SAPSTARTSRV=$(ps -eo exe | grep $2 | grep $3 | grep sapstartsrv | wc -l)

if [[ $SAPSTARTSRV = 0 ]]; then
## No sapstartsrv process running - attempt to start
Expand Down
4 changes: 2 additions & 2 deletions roles/sap_control/tasks/functions/restart_sapstartsrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
register: sap_start_sapstartsrv

- name: SAPstartsrv - Wait for 10 seconds for sapstartsrv to initialize
ansible.builtin.pause:
seconds: 10
ansible.builtin.wait_for:
timeout: 10
11 changes: 6 additions & 5 deletions roles/sap_control/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,17 @@
# Get SAP Facts
- name: Run sap_facts module to gather SAP facts
community.sap_libs.sap_system_facts:
param: "{{ sap_facts_param }}"
# param: "{{ sap_facts_param }}"
register: sap_facts_register

- name: Debug facts
- name: Debug result from sap_libs.sap_system_facts
ansible.builtin.debug:
msg: "{{ sap_facts_register.sap_facts }}"
msg: "{{ sap_facts_register.ansible_facts.sap }}"
verbosity: 1

- name: pause for 10 Seconds
ansible.builtin.pause:
seconds: 10
ansible.builtin.wait_for:
timeout: 10

# Debugging stuff
- name: Display parameters for runtime
Expand Down
6 changes: 3 additions & 3 deletions roles/sap_control/tasks/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
vars:
sap_control_execute_sid: "{{ item.SID }}"
sap_control_execute_type: "{{ item.Type }}"
sap_control_execute_instance_nr: "{{ item.InstanceNumber }}"
sap_control_execute_instance_nr: "{{ item.NR }}"
sap_control_execute_instance_type: "{{ item.InstanceType }}"
ansible.builtin.include_tasks: "sapcontrol.yml"
loop: "{{ sap_facts_register.sap_facts }}"
loop: "{{ sap_facts_register.ansible_facts.sap }}"
when:
- "item.Type == sap_type"
- "item.InstanceType | lower == sap_type | lower"
Loading