Comments (5)
Thanks @rob0d we have already started an internal discussion about the sap_libs and how to handle the maintenance.
from community.sap_operations.
This is a way to stop all SAP ABAP systems using sap.sap_operations collection
See
https://docs.galaxy.saponrhel.org/
https://galaxy.ansible.com/ui/repo/published/sap/sap_operations/
- name: Stop all ABAP instances on the host
hosts: <hostname>
gather_facts: false
become: true
become_user: root
tasks:
- name: Get all instances on the host
sap.sap_operations.host_info
register: host_info
- name: Stop all ABAP instances on the host
sap.sap_operations.system:
name: ABAP
state: stopped
instance_number: "{{ instance_number }}"
loop: "{{ host_info.instances }}"
vars:
instance_number: "{{ item.mSystemNumber }}"
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
from community.sap_operations.
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 no entry sap_facts
the problem came by the fact that sap_facts_register return ansible_facts
and not sap_facts.
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 🥇
from community.sap_operations.
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 :(..
This was probably introduced by commit #bfd09a5 ?
I will try to test the code as it was before to see if it works.
from community.sap_operations.
Hi all,
I just suffered the same issue and figured out that with some minor changes on the main.yml and prepare.yml it started to work.
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:
- the loop to use the dict as it is given by sap_libs module
- the when condition to use the result from InstanceType instead of Type and put both to lower case
- in the vars change item.InstanceNumber to item.Nr
See the screenshots:
For my situation that worked.
Let me know what you think.
Id' be glad if you consider to use my solution.
Cheers,
Rainer
from community.sap_operations.
Related Issues (13)
- New role: HANA Revision upgrades
- New Role: SAP Kernel upgrade on the SAP-APPS environments.
- rewrite sap_operation roles to use the hdbsql module from sap_libs
- rewrite sap_control role to use sapcontrol module out of sap_libs HOT 2
- rewrite sap_operation roles to use sap_system_facts HOT 2
- New Role: Ensure HANA system replication HOT 1
- New Role: SAP on Oracle DB - SBP Update HOT 2
- sap_facts not working with param "hana" or "all" HOT 2
- sap_control_function HOT 1
- sapcontrol stop/start not working
- check_sapstartsrv of sap_facts.sh could return wrong results
- sap_profile_update | handle | unable to include_role from handler HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.sap_operations.