Chapter 5. RHEL System Roles for SAP
RHEL System Roles for SAP is a set of roles executable by Anisble that can assist you with configuring your local or remote hosts (managed nodes) for the installation of SAP HANA.
5.1. Installing Ansible Engine
RHEL subscriptions provide support for RHEL System Roles with Ansible Engine, which is available in the Ansible Engine repository.
Note that if you already have an Ansible Tower or Ansible Engine, you can skip this step and proceed to Installing RHEL System Roles for SAP.
Prerequisites
-
rootaccess
Procedure
Enable the Ansible repository:
# subscription-manager repos \ --enable=ansible-2.9-for-rhel-8-$(uname -m)-rpms
Install the Ansible Engine:
# yum install ansible
5.2. Installing RHEL System Roles for SAP
RHEL System Roles for SAP include sap-preconfigure, sap-netweaver-preconfigure, and sap-hana-preconfigure. These roles can be used to configure the local or remote managed nodes.
Prerequisites
-
rootaccess You have installed Ansible Engine or Ansible Tower
For more information on how to Install Ansible Engine, see Installing Ansible Engine.
Procedure
Install RHEL System Roles for SAP:
# yum install rhel-system-roles-sap
5.3. Server configuration with RHEL System Roles for SAP
The RHEL System Roles for SAP provide a quick, easy, and consistent method for performing the configuration of your server according to applicable SAP notes for SAP HANA.
5.3.1. Configuring a local managed node
If the Ansible Engine is installed on same host on which you want to install SAP HANA, perform the steps outlined in this procedure to configure your local managed node.
Prerequisites
-
rootaccess
Procedure
Create a file named
sap-hana.ymlwith the following content:--- - hosts: localhost vars: ansible_connection: local sap_preconfigure_fail_if_reboot_required: no sap_hana_preconfigure_fail_if_reboot_required: no sap_hana_preconfigure_update: yes roles: - role: sap-preconfigure - role: sap-hana-preconfigureImportantThe indentation and the use of spaces instead of tabs is essential for YAML files.
Run the
sap-hana.ymlansible playbook:# ansible-playbook sap-hana.yml
This will configure the local managed node according to the applicable SAP notes for SAP HANA.
- Reboot the server.
Additional resources
5.3.2. Configuring a remote managed node
If you have a separate Ansible Engine Control Node, perform the steps outlined in this procedure to automatically configure one or more managed nodes.
Prerequisites
Configured SSH connection to the managed hosts
For more information, see Connection methods and details.
-
rootaccess
Procedure
Create or modify the file
/etc/ansible/hostswith new host names to be configured:host01 host02
Replace
host01andhost02with the names of your managed nodes. Each managed node name must be on a separate line.Create a file named
sap-hana.ymlwith the following content:- hosts: all vars: sap_preconfigure_fail_if_reboot_required: no sap_hana_preconfigure_fail_if_reboot_required: no sap_hana_preconfigure_update: yes roles: - role: sap-preconfigure - role: sap-hana-preconfigureImportantThe indentation and the use of spaces instead of tabs is essential for YAML files.
Run the
sap-hana.ymlansible playbook:# ansible-playbook -l host01,host02 sap-hana.yml
Replace host01 and host02 with the names of your managed nodes.
This will configure the remote host01 and host02 according to the applicable SAP notes for SAP HANA.
- Reboot the servers host01 and host02.
Additional resources