Compare commits

...

No commits in common. "c8" and "imports/c9-beta/rhel-system-roles-sap-3.1.1-15.el9" have entirely different histories.

9 changed files with 317 additions and 39622 deletions

6
.gitignore vendored
View File

@ -1,2 +1,4 @@
SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz
SOURCES/redhat.sap_install-1.3.5.tar.gz SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

View File

@ -1,2 +1,4 @@
584f8d1681adf13cb7af256a7b38d94ca80dcab2 SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz 2c8f0a9cddc4b6ecdfb149c22c86c8c18394aff9 SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz
835376d0e4799989e9d4deb21ac7e1d335c941de SOURCES/redhat.sap_install-1.3.5.tar.gz 80114f5c167f5f1fa940c3c21145498f54d97f5b SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
0883d358ca5eb466fad455af80fa1cf8abdef29f SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
e9bf401559ab460d4a3079fab8faa2bd7183b170 SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

52
SOURCES/README.md Normal file
View File

@ -0,0 +1,52 @@
Red Hat Enterprise Linux System Roles for SAP Ansible Collection
=====================================
Red Hat Enterprise Linux System Roles for SAP is a set of roles for preparing Red Hat Enterprise Linux systems for the initial installation of SAP NetWeaver and SAP HANA.
## Dependencies
If installing from RPM, any dependencies will be installed with the package.
Otherwise, the dependencies are listed in `requirements.txt` and/or `bindep.txt`.
## Installation
There are currently two ways to use the Red Hat Enterprise Linux System Roles for SAP Collection in your setup.
### Installation from Automation Hub
You can install the collection from Automation Hub by running:
```
ansible-galaxy collection install sap.rhel
```
After the installation, the roles are available as `sap.rhel.<role_name>`.
Please see the [Using Ansible collections documentation](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for further details.
### Installation via RPM
You can install the collection with the software package management tool `dnf` by running:
```
dnf install rhel-system-roles-sap
```
## Documentation
The official RHEL System Roles for SAP documentation can be found [here](https://access.redhat.com/articles/4488731).
## Support
### Supported Ansible Versions
The supported Ansible versions are aligned with currently maintained Ansible versions that support Collections (Ansible 2.9 and later). You can find the list of maintained Ansible versions [here](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status).
### Modules and Plugins
The modules and other plugins in this collection are private, used only internally to the collection, unless otherwise noted.
### Supported Roles
<!--ts-->
* preconfigure
* hana_preconfigure
* netweaver_preconfigure
<!--te-->

59
SOURCES/galaxy.yml Normal file
View File

@ -0,0 +1,59 @@
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: sap
# The name of the collection. Has the same character restrictions as 'namespace'
name: rhel
# The version of the collection. Must be compatible with semantic versioning
version: 3.1.1
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
# @nicks:irc/im.site#channel'
authors:
- Bernd Finger <bfinger@redhat.com>
- Markus Koch <mkoch@redhat.com>
- Than Ngo <than@redhat.com>
### OPTIONAL but strongly recommended
# A short summary description of the collection
description: Ansible Collection to prepare a RHEL 7.6 or later system for the installation of SAP NetWeaver or SAP HANA
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
license:
- GPL-3.0-or-later
- Apache-2.0
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
# mutually exclusive with 'license'
# license_file: ''
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: [sap]
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies: {}
# The URL of the originating SCM repository
repository: https://github.com/sap-linux-roles/sap-linux-roles.github.io/
# The URL to any online docs
documentation: https://github.com/sap-linux-roles/sap-linux-roles.github.io/blob/master/README.md
# The URL to the homepage of the collection/project
homepage: https://sap-linux-roles.github.io
# The URL to the collection issue tracker
issues: https://github.com/sap-linux-roles/sap-linux-roles.github.io/issues

File diff suppressed because it is too large Load Diff

View File

@ -1,128 +0,0 @@
commit 83db825f7f30445408efa6061631d8dd0590e891
Author: Than Ngo <than@redhat.com>
Date: Thu Jan 25 16:17:21 2024 +0100
add missing tools folders
Signed-off-by: Than Ngo <than@redhat.com>
diff --git a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh b/roles/sap_general_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_general_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'
diff --git a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh b/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'
diff --git a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh b/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'

View File

@ -0,0 +1,19 @@
diff -up sap-hana-preconfigure/README.md.me sap-hana-preconfigure/README.md
--- sap-hana-preconfigure/README.md.me 2021-03-22 14:08:21.960414814 +0100
+++ sap-hana-preconfigure/README.md 2021-03-22 14:10:28.220020075 +0100
@@ -216,13 +216,13 @@ In case you want the role to set or chec
sap_hana_preconfigure_use_netapp_settings_nfsv3
```
-### Add the repository for IBM service and productivity tools for POWER (ppc64le only)
+### Add the repository for IBM service and productivity tools (ppc64le only)
In case you do *not* want to automatically add the repository for the IBM service and productivity tools, set the following variable to `no`. Default is `yes`, meaning that the role will download and install the package specified in variable sap_hana_preconfigure_ibm_power_repo_url (see below) and also run the command /opt/ibm/lop/configure to accept the license.
```yaml
sap_hana_preconfigure_add_ibm_power_repo
```
-### URL for IBM service and productivity tools for POWER (ppc64le only)
+### URL for IBM service and productivity tools (ppc64le only)
The following variable is set to the location of package ibm-power-repo-lastest.noarch.rpm or a package with similar contents, as defined by variable __sap_hana_preconfigure_ibm_power_repo_url in vars/RedHat_7.yml and vars/RedHat_8.yml.
You can replace it by your own URL by setting this variable to a different URL.
```yaml

View File

@ -1,10 +1,12 @@
# disable collection_artifact by default %if 0%{?rhel} && ! 0%{?epel}
%bcond_with ansible
%else
%bcond_without ansible
%endif
%bcond_with collection_artifact %bcond_with collection_artifact
# disable collection by default since version 3.6.0 (1.3.4) %if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_with collection
%if 0%{?fedora} || 0%{?rhel} > 8
%bcond_without html %bcond_without html
%else %else
# pandoc is not supported in rhel 7 and older, # pandoc is not supported in rhel 7 and older,
@ -12,57 +14,48 @@
%bcond_with html %bcond_with html
%endif %endif
%global collection_name sap_install %global collection_namespace sap
%if 0%{?rhel} %if 0%{?rhel}
%define package_name rhel-system-roles-sap %define package_name rhel-system-roles-sap
%global collection_namespace redhat %global collection_name rhel
%else %else
%define package_name linux-system-roles-sap %define package_name linux-system-roles-sap
%global collection_namespace community %global collection_name linux
%endif %endif
# collection_version has to be increased by every rebuild # collection_version has to be increased by every rebuild
# otherwise, it cannot be uploaded to Automation Hub and Galaxy # otherwise, it cannot be uploaded to Automation Hub and Galaxy
# due to version conflict # due to version conflict
%define collection_version 1.3.5 %define collection_version 3.1.4
%global mainid e2a233f5a0cb68363798bf014b16552cca681bd0 %global mainid 411f58b0e8da72cd69827d6ed30d8925bea5cb23
%global commit_id_sap_install %{collection_version} %global gitcommit_sap d065073dca5617292d768ea0e044994653f84667
%global rolename1 sap_general_preconfigure %global gitcommit_sap_hana 083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b
%global rolename2 sap_ha_install_hana_hsr %global gitcommit_sap_netweaver bf771416116b670ccf17f8e289adbe14df20208b
%global rolename3 sap_hana_install %global rolename1 sap-preconfigure
%global rolename4 sap_hana_preconfigure %global rolename2 sap-hana-preconfigure
%global rolename5 sap_ha_pacemaker_cluster %global rolename3 sap-netweaver-preconfigure
%global rolename6 sap_hypervisor_node_preconfigure
%global rolename7 sap_netweaver_preconfigure
%global rolename8 sap_swpm
%global rolename9 sap_vm_preconfigure
%global src_owner linux-system-roles %global src_owner linux-system-roles
%global github_repo_sap_install redhat.sap_install
%global rolename_rhel %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename6} %{rolename7} %{rolename8} %{rolename9}
%global rolenames %{rolename_rhel}
Name: %{package_name} Name: %{package_name}
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 3.6.0 Version: 3.1.1
Release: 2%{?dist} Release: 15%{?dist}
License: GPL-3.0-or-later License: GPLv3+
Url: https://github.com/redhat-sap/community.sap_install Url: https://github.com/berndfinger
Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
Source1: https://github.com/redhat-sap/redhat.sap_install/archive/%{commit_id_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.tar.gz Source1: https://github.com/berndfinger/sap-preconfigure/archive/%{gitcommit_sap}/sap-preconfigure-%{gitcommit_sap}.tar.gz
Source2: https://github.com/berndfinger/sap-hana-preconfigure/archive/%{gitcommit_sap_hana}/sap-hana-preconfigure-%{gitcommit_sap_hana}.tar.gz
# add collection files Source3: https://github.com/berndfinger/sap-netweaver-preconfigure/archive/%{gitcommit_sap_netweaver}/sap-netweaver-preconfigure-%{gitcommit_sap_netweaver}.tar.gz
Patch1: redhat.sap_install-1.3.5-collections-files-324bfb8bab50d2baa1c4aacdb59e4e5c9e2ba74f.patch Source4: README.md
Source5: galaxy.yml
# add tests files # patches 0-49 for sap-preconfigure
Patch2: redhat.sap_install-1.3.4-add_tests.patch # patches 50-99 for sap-hana-preconfigure
Patch50: sap-hana-preconfigure-md2html-error.patch
# add tools files # patches 100-149 for sap-netweaver-preconfigur
Patch3: redhat.sap_install-1.3.4-add_tools.patch
BuildArch: noarch BuildArch: noarch
Requires: rhel-system-roles
%if %{with html} %if %{with html}
# Requirements for md2html.sh to build the documentation # Requirements for md2html.sh to build the documentation
@ -87,14 +80,8 @@ Requires: python-jmespath
Requires: python-netaddr Requires: python-netaddr
%endif %endif
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable %if %{with ansible}
# in buildroot as it depended on modular Python. BuildRequires: ansible >= 2.9.10
# It has been installable at buildtime in 8.8 and newer.
%if %{with collection}
%if 0%{?rhel} >= 8
BuildRequires: ansible-core >= 2.11.0
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
%endif
%endif %endif
%if %{undefined __ansible_provides} %if %{undefined __ansible_provides}
@ -103,15 +90,22 @@ Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{ver
# be compatible with the usual Fedora Provides: # be compatible with the usual Fedora Provides:
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release} Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
# ansible-galaxy is available by ansible-core on RHEL 8.6 and newer at buildtime.
%define ansible_collection_build() ansible-galaxy collection build
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%if 0%{?fedora} || 0%{?rhel} >= 8
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/} %{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
%if %{undefined ansible_collection_build}
%if %{without ansible}
# Empty command. We don't have ansible-galaxy.
%define ansible_collection_build() :
%else %else
%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1} %define ansible_collection_build() ansible-galaxy collection build
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/ %endif
%endif
%if %{undefined ansible_collection_install}
%if %{without ansible}
# Simply copy everything instead of galaxy-installing the built artifact.
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}; cp -a . %{buildroot}%{ansible_collection_files}/%{collection_name}/
%else
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif %endif
%endif %endif
@ -128,95 +122,101 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
%endif %endif
%prep %prep
%setup -q -a1 -n auto-maintenance-%{mainid} %setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid}
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/ # rename the source directories without gitcommit_sap
%patch -P1 -p1 mv sap-preconfigure-%{gitcommit_sap} sap-preconfigure
%patch -P2 -p1 mv sap-hana-preconfigure-%{gitcommit_sap_hana} sap-hana-preconfigure
%patch -P3 -p1 mv sap-netweaver-preconfigure-%{gitcommit_sap_netweaver} sap-netweaver-preconfigure
# workaround for md2html error
sed -i -e "s|for POWER ||g" roles/sap_hana_preconfigure/README.md # cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy
mkdir .collections
cp %{SOURCE5} galaxy.yml
sed -i -e "s|name: rhel|name: %{collection_name}|" galaxy.yml
# add correct version for Automation Hub and Galaxy
sed -i -e "s|version: 3.1.1|version: %{collection_version}|" galaxy.yml
pushd sap-preconfigure
popd
pushd sap-hana-preconfigure
%patch50 -p1
popd
pushd sap-netweaver-preconfigure
popd popd
# remove zero file and symlinks # remove git stuff
find . -type f -size 0 -delete rm -rf *-preconfigure/.git*
find . -type l -delete # remove zero file
rm -f sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml
# fix python and bash shebangs # remove all SLES stuff and RHEL 6 stuff
find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!/usr/bin/python3=' {} + rm -rf sap-hana-preconfigure/tasks/SLES/
find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */bin/bash=#!/usr/bin/bash=' {} + rm -rf sap-hana-preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc
rm -rf sap-hana-preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines
# remove json files, these are already present in the collection subdirectory rm -f sap-hana-preconfigure/tasks/sapnote/1944799.yml
rm -f FILES.json MANIFEST.json rm -f sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings
rm -f sap-hana-preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings
rm -f sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings
rm -rf sap-hana-preconfigure/tasks/sapnote/2578899 # SLES 15 - installation
rm -rf sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA
rm -f sap-hana-preconfigure/vars/RedHat_6.5.yml
rm -f sap-hana-preconfigure/vars/RedHat_6.6.yml
rm -f sap-hana-preconfigure/vars/RedHat_6.7.yml
rm -f sap-hana-preconfigure/vars/SLES_15.yml
%build %build
%if %{with html} sh md2html.sh \
readmes="" sap-preconfigure/README.md \
sap-hana-preconfigure/README.md \
sap-netweaver-preconfigure/README.md
for role in %{rolename1} %{rolename2} %{rolename3} ; do
new_role="$(echo ${role/sap-/} | tr '-' '_')"
python3 lsr_role2collection.py --role "$role" \
--src-path "$role" \
--src-owner %{src_owner} \
--dest-path .collections \
--readme %{SOURCE4} \
--namespace %{collection_namespace} \
--collection %{collection_name} \
--new-role "$new_role" \
--extra-mapping "timesync:redhat.rhel_system_roles.timesync,storage:redhat.rhel_system_roles.storage,sap-preconfigure:sap.rhel.preconfigure,sap-hana-preconfigure:sap.rhel.hana_preconfigure,sap-netweaver-preconfigure:sap.rhel.netweaver_preconfigure"
done
rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt
# Merge .sanity-ansible-ignore-2.9-ROLENAME.txt into tests/sanity/ignore-2.9.txt
for role in %{rolenames}; do for role in %{rolenames}; do
readmes="${readmes} %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md" if [ -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt ];
then
cat .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt \
>> .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt
rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-*-"$role".txt
fi
done done
sh md2html.sh $readmes %{github_repo_sap_install}-%{commit_id_sap_install}/README.md
%endif
%if %{with collection} # removing dot files/dirs
# create dest-path rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]*
mkdir .collections
for role in %{rolenames} ; do
LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 lsr_role2collection.py --role "$role" \
--src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \
--src-owner %{src_owner} \
--dest-path .collections \
--namespace %{collection_namespace} \
--collection %{collection_name} \
--new-role "$new_role"
done
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name} cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# update README.md
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# Build the collection # build collection file
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_build %ansible_collection_build
popd
%endif
%install %install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
$RPM_BUILD_ROOT%{_pkgdocdir} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure
# create file selection for documents cp -pR sap-hana-preconfigure sap-preconfigure sap-netweaver-preconfigure $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
echo "%dir %{_pkgdocdir}" > files_section.txt cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/ cp -p sap-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure/
cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure/
%if %{with html}
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.html $RPM_BUILD_ROOT%{_pkgdocdir}/
%endif
echo "%{_pkgdocdir}/README.*" >> files_section.txt
for role in %{rolenames} ; do
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/$role
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/LICENSE \
%{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md \
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
%if %{with html}
install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.html \
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
%endif
echo "%dir %{_pkgdocdir}/$role" >> files_section.txt
done
# install collection files # install collection files
%if %{with collection}
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_install %ansible_collection_install
popd popd
%else
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/collections $RPM_BUILD_ROOT%{_datadir}/ansible/
%endif
# install collection_artifact # install collection_artifact
%if %{with collection_artifact} %if %{with collection_artifact}
@ -226,123 +226,84 @@ mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_
popd popd
%endif %endif
%files -f files_section.txt %files
%dir %{_pkgdocdir}
%dir %{_pkgdocdir}/sap-preconfigure
%dir %{_pkgdocdir}/sap-hana-preconfigure
%dir %{_pkgdocdir}/sap-netweaver-preconfigure
%dir %{_datadir}/ansible %dir %{_datadir}/ansible
%dir %{_datadir}/ansible/roles %dir %{_datadir}/ansible/roles
%doc %{_pkgdocdir}/*/README.md %doc %{_pkgdocdir}/*/README.md
%license %{_pkgdocdir}/*/LICENSE %license %{_pkgdocdir}/*/LICENSE
%{_datadir}/ansible/roles/* %{_datadir}/ansible/roles/*
%if %{with html}
%{_pkgdocdir}/*/README.html
%endif
%if %{with collection}
%{ansible_collection_files} %{ansible_collection_files}
%else
%{_datadir}/ansible/collections
%endif
%if %{with collection_artifact} %if %{with collection_artifact}
%files collection-artifact %files collection-artifact
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz %{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif %endif
%changelog %changelog
* Mon Feb 05 2024 Than Ngo <than@redhat.com> - 3.6.0-2 * Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-15
- sap_hypervisor_node_preconfigure: fix for role name and path for included tasks - Related: #2021579, ansible-lint cleanup
- update collection files
Related: RHEL-16897
* Thu Jan 25 2024 Than Ngo <than@redhat.com> - 3.6.0-1 * Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-14
- rebase sap roles to version 1.3.4 - Resolves: #2021579, ansible-lint cleanup
- add collection files
- update README files and add missing galaxy.yml, LICENSE
- fix syntax error for defining dependent collections in galaxy.yml
- add tools and tests
Resolves: RHEL-16897
* Mon May 08 2023 Than Ngo <than@redhat.com> - 3.5.0-1 * Fri Oct 15 2021 Than Ngo <than@redhat.com> - 3.1.1-13
- updated README.md files for sap and sap_swpm roles - Fix the version of the collection tar file
- migrated to SPDX license
- converted patch macro use to the most compatible syntax
- rebased sap roles to version 1.2.3
Resolves: #2185037
* Fri Oct 15 2021 Than Ngo <than@redhat.com> - 3.1.1-12
- Resolves: #2003630, Pepare the roles for ansible-core 2.11: Only use ansible.core modules
* Mon Jan 30 2023 Than Ngo <than@redhat.com> - 3.4.0-3 * Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-11
- Related: #2155876, rebase sap roles to version 1.2.1 - fix yum group install errors on RHEL 7
* Thu Jan 19 2023 Than Ngo <than@redhat.com> - 3.4.0-2
- Related: #2155876, compat-sap-c++-10 is not available for RHEL 8.2 and earlier on hardware platform s390x
* Wed Jan 11 2023 Than Ngo <than@redhat.com> - 3.4.0-1
- Resolves: #2155876, rebase sap roles to version 1.2.0
* Tue Nov 22 2022 Than Ngo <than@redhat.com> - 3.3.0-4
- Resolves: #2142957, drop deprecated paramater for Ansible 2.14
* Fri Jul 15 2022 Than Ngo <than@redhat.com> - 3.3.0-3
- update galaxy.yml and README.md and url
Related: #2103633
* Tue Jul 12 2022 Than Ngo <than@redhat.com> - 3.3.0-2
- make the role Ansible 2.13 compliant
- get rid of all the new ansible-lint 6.3.0 errors for preconfigure and sap_hana_install roles
Resolves: #2103633
* Mon Jul 04 2022 Than Ngo <than@redhat.com> - 3.3.0-1
- Resolves: #2103633, include roles for setting up a two-node SAP HANA pacemaker cluster
* Thu Jun 09 2022 Than Ngo <than@redhat.com> - 3.2.0-3
- sap_hana_preconfigure: Add vars for RHEL 9.1 managed nodes
- sap_general_preconfigure: fix variable inclusion for RHEL minor releases
Related: #2063050
* Wed Jun 08 2022 Than Ngo <than@redhat.com> - 3.2.0-2
- sap_general_preconfigure: do not attempt to enable HANA repos for s390x
- sap_hana_preconfigure: using wrong variable name
- sap_hana_preconfigure: Fix issue sap-linuxlab#154
Related: #2063050
* Mon Mar 21 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2063050, rebase to new upstream org sap-linuxlab
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #2016858, increase release to avoid update conflict
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- Related: #2016858, rebase
* Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-7
- Resolves: #2016858, ansible-lint cleanup
* Wed Sep 08 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- set min kernel version for RHEL 8.4 x86_64
- use grubby for setting tsx=on - use grubby for setting tsx=on
- add tsx=on to the kernel command line unconditionally - set min kernel version for RHEL 8.4 x86_64
* Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-5 * Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #1928398, fix yum group install errors on RHEL 7 - Related: #1977195, fix #149, #177, #193, #194
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-4 * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.1-9
- Related: #1928398, fix #149, #177, #193, #194 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jul 12 2021 Than Ngo <than@redhat.com> - 3.1.1-3 * Fri Jul 16 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- add missing __sap_preconfigure_envgroups for RHEL 7.x - Related: #1977195, add missing vars/RedHat_9.yml in sap-netweaver-preconfigure
- add __sap_hana_preconfigure_req_repos variables for RHEL 8.5 and later
Related: #1928398
* Thu Jul 01 2021 Than Ngo <than@redhat.com> - 3.1.1-2 * Tue Jul 13 2021 Than Ngo <than@redhat.com> - 3.1.1-7
- Related: #1928398, add missing changelogs - Related: #1977195, add missing __sap_preconfigure_envgroups for RHEL 7.x and
missing __sap_hana_preconfigure_req_repos variables for RHEL 8.5 and later
* Tue Jun 29 2021 Than Ngo <than@redhat.com> - 3.1.1-1 * Tue Jun 29 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- Resolves: #1928398, rebase to 3.1.1 for Ansible Collections - Resolves: #1977195, make RHEL system roles for SAP RHEL9 compatible
* Fri Mar 05 2021 Than Ngo <than@redhat.com> - 3.0.1-4 * Mon Jun 28 2021 Than Ngo <than@redhat.com> - 3.1.1-5
- fixed issue #130 in sap-preconfigure - updated tarball, galaxy.yml, README.md
- fixed typos in README.md in sap_hana_preconfigure
- added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md * Mon Jun 07 2021 Than Ngo <than@redhat.com> - 3.1.1-4
- fixed issue #170 in sap_hana_preconfigure - update README.md
Related: #1891642 - Adding the -collection-artifact subpackage, enabled using
"--with collection_artifact". It is used for importing to
ansible galaxy/automation hub.
* Fri May 21 2021 Than Ngo <than@redhat.com> - 3.1.1-3
- convert roles to FQCN in the README files
* Thu May 20 2021 Than Ngo <than@redhat.com> - 3.1.1-2
- rename dashes by underscores and drop sap-
* Tue May 18 2021 Than Ngo <than@redhat.com> - 3.1.1-1
- rebase
* Wed Apr 14 2021 Than Ngo <than@redhat.com> - 3.1.0-3
- bz#1928398, rebuilt against new python-ruamel-yaml-0.15.100 for conversion problem
* Mon Mar 22 2021 Than Ngo <than@redhat.com> - 3.1.0-2
- rebase
* Tue Mar 02 2021 Than Ngo <than@redhat.com> - 3.1.0-1
- added support Transfer SAP roles into collection format
* Wed Feb 24 2021 Than Ngo <than@redhat.com> - 3.0.1-3 * Wed Feb 24 2021 Than Ngo <than@redhat.com> - 3.0.1-3
- Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure - Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure
@ -360,6 +321,9 @@ Related: #2063050
- Resolves: #1891638, bug fixes - Resolves: #1891638, bug fixes
- Resolves: #1891642, new features - Resolves: #1891642, new features
* Tue Jan 12 2021 Than Ngo <than@redhat.com> - 2.0.0-8
- RHEL 9.0.0 Alpha build
* Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7 * Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7
- Related: #1867027, fix #119 - Related: #1867027, fix #119