Chapter 2. Installing the Ansible Engine and RHEL System Roles for SAP Use the following procedure for installing Ansible Core and the RHEL System Roles for SAP package or collection. Note For installing packages on a Red Hat Satellite system, do not use the plain dnf command but follow the instructions in How to install or update packages in Red Hat Satellite 6? . Procedure Install Ansible Core: # dnf install ansible-core Continue with step 2 for installing the RHEL package rhel-system-roles-sap or with step 3 for installing the Automation Hub collection redhat.sap_install . For installing the RHEL package rhel-system-roles-sap : Enable the RHEL for SAP Solutions repository using Red Hat Subscription Manager: # subscription-manager repos --enable=rhel-USD(rpm -E %rhel)-for-USD(uname -m)-sap-solutions-rpms Install the RHEL System Roles for SAP: # dnf install rhel-system-roles-sap The rhel-system-roles-sap package is installed to /usr/share/ansible/roles/<role> , where <role> is the name of the individual role, for example, sap_hana_preconfigure . Each role includes a README.md file which explains all variables and how to use the role. For installing the Automation Hub collection redhat.sap_install , you can either directly install the collection from Automation Hub or first download it and then install it from the downloaded file. To install the collection directly from Automation Hub, follow the instructions on this page . The essential steps are: Make a copy of your Offline token, the Server URL, and the SSO URL from this page and note the Server URL and SSO URL on the same page. If needed (e.g. because it expired), recreate the token. Use these values to configure file /etc/ansible/ansible.cfg according to the instructions in this chapter . Use the Server URL for variable url , the SSO URL for variable auth_url , and the Offline token for variable token , as in the following example (replace the dummy token by the actual token): [galaxy] server_list = automation_hub_install [galaxy_server.automation_hub_install] url = https://console.redhat.com/api/automation-hub/[https://console.redhat.com/api/automation-hub/] auth_url = https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token[https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token] token = 123567890abcdef...abcdef1234 Install the collection by running the following command as the user which will use the collection (the user which will run the playbooks to install software or configure settings on managed nodes): # ansible-galaxy collection install redhat.sap_install This will install the collection into the default location for the user (necessary directories will be created recursively), which is: ~/.ansible/collections/ansible_collections/redhat/sap_install . To download the collection from Automation Hub and then install it, perform the following step: Download the collection tar file from this page (use the Download tarball link) and then run the following command as the user which will use the collection: # ansible-galaxy collection install ./redhat-sap_install-1.2.1.tar.gz This will also install the collection into the default location for the user, as described before. The file README.md in each role's subdirectory below sap_install , e.g. roles/sap_general_preconfigure , contains the documentation for each of the roles.

Commands:
dnf install ansible-core
subscription-manager repos --enable=rhel-USD(rpm -E %rhel)-for-USD(uname -m)-sap-solutions-rpms
dnf install rhel-system-roles-sap
[galaxy] server_list = automation_hub_install [galaxy_server.automation_hub_install] url = https://console.redhat.com/api/automation-hub/[https://console.redhat.com/api/automation-hub/] auth_url = https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token[https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token] token = 123567890abcdef...abcdef1234
ansible-galaxy collection install redhat.sap_install
ansible-galaxy collection install ./redhat-sap_install-1.2.1.tar.gz