sap-linuxlab / community.sap_operations Goto Github PK
View Code? Open in Web Editor NEWAutomation for SAP - Collection of Ansible Roles for various operational tasks with SAP Systems
License: Apache License 2.0
Automation for SAP - Collection of Ansible Roles for various operational tasks with SAP Systems
License: Apache License 2.0
Hello,
I am facing the problem when executing the sap_control_function: stop_all_sap
The Problem seems to be the task in sap_operations/roles/sap_control/tasks/sapcontrol.yml line 20.
I have commented out the args warn: false:
# Execute sapcontrol
- name: SAP {{ sap_control_name_header }} - Executing sapcontrol -nr {{ passed_sap_nr }} -function {{ vars['sap_control_' + funct_type] }}
ansible.builtin.shell: |
source ~/.profile && sapcontrol -nr {{ passed_sap_nr }} -function {{ vars['sap_control_' + funct_type] }}
args:
executable: /bin/bash
#warn: false
become: true
become_user: "{{ passed_sap_sid | lower }}adm"
register: sapcontrol_status
failed_when: "'FAIL' in sapcontrol_status.stdout"
Currently, we are upgrading our 50 large HANA Databases manually downloading software and putting it on an NFS drive that is shared across the servers.. For the time being, we are currently running the HANA upgrade ./hdlcm script manually however we were looking into automating this but in your Red Hat Ansible community, we could only find playbooks related to full deployments.
Hello,
we are currently trying to use the sap_facts module for our automization. However, When using the "hana" param, it will just get stuck in the process. We have noticed that it works, after commenting out the content of the check_sapcontrol() function:
Here's what ps fax shows on both RHEL 8 and 9:
Is there any way to resolve this issue without having to use a workaround?
Thanks!
We are currently deploying these SAP Kernels on the SAP Application layer via OS manually, we were hoping to also automate this for newer versions coming out as we have more than 100 application instances for the time being.
It would be great if the SAP Bundle Patch updates delivered by SAP could be applied using ansible.
This would be great to make updates during non-working hours.
rewrite sap_operation roles to use the hdbsql module from sap_libs
rewrite sap_control role to use sapcontrol module out of sap_libs
rewrite sap_operation roles to use sap_system_facts
If an instancenumber is any given number below 60 and the sapstartsrv is restarted in the last hour the function check_sapstartsrv could return wrong values because part of the grep command could address the runtime instead of the instancenumber of the SAP SID
Problem in file sap_facts.sh in function check_sapstartsrv on line 289
Change:
SAPSTARTSRV=$(ps -ef | grep $2 | grep $3 | grep sapstartsrv | wc -l)
To:
SAPSTARTSRV=$(ps -eo cmd | grep $2 | grep $3 | grep sapstartsrv | wc -l)
---
- name: "sapcontrol"
hosts: all
gather_facts: true
become: true
#Function to execute:
# restart_all_sap
# restart_all_nw
# restart_all_hana
# restart_sap_nw
# restart_sap_hana
# stop_all_sap
# start_all_sap
# stop_all_nw
# start_all_nw
# stop_all_hana
# start_all_hana
# stop_sap_nw
# start_sap_nw
# stop_sap_hana
# start_sap_hana
# vars_prompt:
# - name: sap_sid
# prompt: Please enter target SAP System ID (SID)
# private: no
vars_prompt:
- name: sapcontrol_function
prompt: "Choose valid sap_control_function parameter"
private: no
vars:
sap_control_function: "{{ sapcontrol_function }}"
tasks:
- name: "Execute {{ sap_control_function }}"
ansible.builtin.include_role:
name: { role: community.sap_operations.sap_control }
This role should ensure that in an HSR Cluster the primary and secondaries are set as required
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.