This Ansible Role executes basic SAP administration tasks on Linux operating systems.
This Ansible Role executes basic SAP administration tasks on Linux operating systems, including:
- Start/Stop/Restart of SAP HANA Database Server
- Start/Stop/Restart of SAP NetWeaver Application Server
- Multiple Automatic discovery and Start/Stop/Restart of SAP HANA Database Server or SAP NetWeaver Application Server
- hosts: sap_servers
roles:
- { role: community.sap_operations.sap_control }
- Using restart all
sap_control_function: "restart_all_sap"
- Using a specific SAP SID
sap_control_function: "stop_sap_hana" sap_sid: "HDB"
This role has been tested with RHEL, and is designed for Linux operating systems.
This role has not been tested and amended for SAP NetWeaver Application Server instantiations on IBM AIX or Windows Server.
Assumptions for executing this role include:
- Instances of either SAP HANA Database Server or SAP NetWeaver Application Server are installed to the target host
- Relevent OS Packages for SAP are installed
- Registered OS License and OS Package repositories are available (from the relevant content delivery network of the OS vendor)
This role has been tested with SAP NetWeaver Application Server 7.53 and SAP HANA Database Server 2.0 SPS04 rev 20.
This role has not been tested with other versions of SAP NetWeaver Application Server, however it should work for all versions above SAP NetWeaver Application Server 7.50.
This role has not been tested with other versions of SAP HANA Database Server, however it should work for all versions above SAP HANA 2.0 SPS00.
Assumptions for executing this role include:
- Installations used default
/usr/sap
and/sapmnt
directories - Installations for SAP HANA used default
/hana/shared
directory
variable | info | required |
---|---|---|
SID |
SAP system SID | no, only if you are targetting a single SAP system |
nowait |
Default: false |
no, use only when absolutely sure! This will bypass all waiting and ignore all necessary steps for a graceful stop / start |
sap_control_function |
Function to execute:
|
yes, only this is required to detect the Instance Number which is used with SAP Host Agent sapcontrol CLINote: Executions using all will automatically detect any System IDs and corresponding Instance Numbers |
The following diagram demonstrates the Ansible Role workflow, where the variable sap_control_function
is set with different values (such as "restart_all") and will perform different sequence of SAP Host Agent sapcontrol
CLI functions.