-
Notifications
You must be signed in to change notification settings - Fork 18
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
sap_control role can't call sap_system_facts module #25
Comments
Hi @ge87sik I've gone through the code and there is definitely a problem in
The problem came from the fact that the module sap_libs.sap_system_facts doesn't take any options with it so the param is an element no known by the task. You can see it here: https://github.com/sap-linuxlab/community.sap_libs/blob/7d8bc0f11c2e1f58da73710e7925f456d011ec0c/plugins/modules/sap_system_facts.py Regarding the For now just try to replace sap_facts with ansible_facts and copy-paste the results here, I'll reach out the other developers to understand what is the correction that need to be done here. Thanks for reporting this 🥇 |
Just to add to this. Even when the parameters are removed from line 90 to allow community.sap_libs.sap_system_facts to work, the role fails further down as the returned values are not as expected by the rest of the code. community.sap_libs.sap_system_facts is not compatible with this role, making it unuseable :(.. |
Thanks @rob0d we have already started an internal discussion about the sap_libs and how to handle the maintenance. |
This is a way to stop all SAP ABAP systems using sap.sap_operations collection
I just types this playbook, please use with caution, GPL3.0-only license and warranty. python-suds package have to be installed on the host you want to run these modules against (if this is a RHEL system). Any other ways to install suds python package should also work. Hope that helps |
Hi all, roles/sap_control/tasks/prepare.yml - name: SAP Control
vars:
sap_control_execute_sid: "{{ item.SID }}"
sap_control_execute_type: "{{ item.Type }}"
sap_control_execute_instance_nr: "{{ item.NR }}"
sap_control_execute_instance_type: "{{ item.InstanceType }}"
ansible.builtin.include_tasks: "sapcontrol.yml"
loop: "{{ sap_facts_register.ansible_facts.sap }}"
when:
- "item.InstanceType | lower == sap_type | lower" Just changed following:
See the screenshots: For my situation that worked. Let me know what you think. Cheers, |
Hello everyone,
I've encountered an issue when trying to use the sap_operations.sap_control role (with sap_control_function set to 'stop_all_nw').
When running the playbook i get the following error message:
From what I understand the role is trying to call the sap_system_facts module with a parameter named 'param', but sap_system_facts doesn't accept any parameters.
I've tried removing the offending line (l. 90) and calling the module without any parameters but then the sap_facts_register variable has no entry 'sap_facts'.
Am I doing something wrong or is there an issue in the code?
Greetings
Manuel
The text was updated successfully, but these errors were encountered: