Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c750fff1 |
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
|
||||
SOURCES/redhat.sap_install-1.3.5.tar.gz
|
||||
auto-maintenance-1.108.0.tar.gz
|
||||
build-tools-1.7.1.tar.gz
|
||||
redhat.sap_infrastructure-1.3.1.tar.gz
|
||||
redhat.sap_install-1.8.0.tar.gz
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
584f8d1681adf13cb7af256a7b38d94ca80dcab2 SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
|
||||
835376d0e4799989e9d4deb21ac7e1d335c941de SOURCES/redhat.sap_install-1.3.5.tar.gz
|
||||
File diff suppressed because it is too large
Load Diff
@ -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])
|
||||
+ }'
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,397 +0,0 @@
|
||||
# disable collection_artifact by default
|
||||
%bcond_with collection_artifact
|
||||
|
||||
# disable collection by default since version 3.6.0 (1.3.4)
|
||||
%bcond_with collection
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 8
|
||||
%bcond_without html
|
||||
%else
|
||||
# pandoc is not supported in rhel 7 and older,
|
||||
# which is needed for converting .md to .html.
|
||||
%bcond_with html
|
||||
%endif
|
||||
|
||||
%global collection_name sap_install
|
||||
%if 0%{?rhel}
|
||||
%define package_name rhel-system-roles-sap
|
||||
%global collection_namespace redhat
|
||||
%else
|
||||
%define package_name linux-system-roles-sap
|
||||
%global collection_namespace community
|
||||
%endif
|
||||
|
||||
# collection_version has to be increased by every rebuild
|
||||
# otherwise, it cannot be uploaded to Automation Hub and Galaxy
|
||||
# due to version conflict
|
||||
%define collection_version 1.3.5
|
||||
|
||||
%global mainid e2a233f5a0cb68363798bf014b16552cca681bd0
|
||||
%global commit_id_sap_install %{collection_version}
|
||||
%global rolename1 sap_general_preconfigure
|
||||
%global rolename2 sap_ha_install_hana_hsr
|
||||
%global rolename3 sap_hana_install
|
||||
%global rolename4 sap_hana_preconfigure
|
||||
%global rolename5 sap_ha_pacemaker_cluster
|
||||
%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 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}
|
||||
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
|
||||
Version: 3.6.0
|
||||
Release: 2%{?dist}
|
||||
License: GPL-3.0-or-later
|
||||
Url: https://github.com/redhat-sap/community.sap_install
|
||||
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
|
||||
|
||||
# add collection files
|
||||
Patch1: redhat.sap_install-1.3.5-collections-files-324bfb8bab50d2baa1c4aacdb59e4e5c9e2ba74f.patch
|
||||
|
||||
# add tests files
|
||||
Patch2: redhat.sap_install-1.3.4-add_tests.patch
|
||||
|
||||
# add tools files
|
||||
Patch3: redhat.sap_install-1.3.4-add_tools.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: rhel-system-roles
|
||||
|
||||
%if %{with html}
|
||||
# Requirements for md2html.sh to build the documentation
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
BuildRequires: rubygem-kramdown-parser-gfm
|
||||
%else
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: highlight
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Requirements for galaxy_transform.py
|
||||
BuildRequires: python3
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
BuildRequires: python3dist(ruamel.yaml)
|
||||
Requires: python3-jmespath
|
||||
Requires: python3-netaddr
|
||||
%else
|
||||
BuildRequires: python3-ruamel-yaml
|
||||
Requires: python-jmespath
|
||||
Requires: python-netaddr
|
||||
%endif
|
||||
|
||||
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
|
||||
# in buildroot as it depended on modular Python.
|
||||
# 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
|
||||
|
||||
%if %{undefined __ansible_provides}
|
||||
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{version}
|
||||
%endif
|
||||
# be compatible with the usual Fedora Provides:
|
||||
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}/}
|
||||
%else
|
||||
%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1}
|
||||
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
Collection of Ansible roles which configures a RHEL system according
|
||||
to applicable SAP notes so that any SAP software can be installed.
|
||||
|
||||
%if %{with collection_artifact}
|
||||
%package collection-artifact
|
||||
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
||||
|
||||
%description collection-artifact
|
||||
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -a1 -n auto-maintenance-%{mainid}
|
||||
|
||||
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/
|
||||
%patch -P1 -p1
|
||||
%patch -P2 -p1
|
||||
%patch -P3 -p1
|
||||
# workaround for md2html error
|
||||
sed -i -e "s|for POWER ||g" roles/sap_hana_preconfigure/README.md
|
||||
popd
|
||||
|
||||
# remove zero file and symlinks
|
||||
find . -type f -size 0 -delete
|
||||
find . -type l -delete
|
||||
|
||||
# fix python and bash shebangs
|
||||
find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!/usr/bin/python3=' {} +
|
||||
find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */bin/bash=#!/usr/bin/bash=' {} +
|
||||
|
||||
# remove json files, these are already present in the collection subdirectory
|
||||
rm -f FILES.json MANIFEST.json
|
||||
|
||||
%build
|
||||
%if %{with html}
|
||||
readmes=""
|
||||
for role in %{rolenames}; do
|
||||
readmes="${readmes} %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md"
|
||||
done
|
||||
sh md2html.sh $readmes %{github_repo_sap_install}-%{commit_id_sap_install}/README.md
|
||||
%endif
|
||||
|
||||
%if %{with collection}
|
||||
# create dest-path
|
||||
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}
|
||||
# update README.md
|
||||
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md .collections/ansible_collections/%{collection_namespace}/%{collection_name}
|
||||
|
||||
# Build the collection
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_build
|
||||
popd
|
||||
|
||||
%endif
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}
|
||||
|
||||
# create file selection for documents
|
||||
echo "%dir %{_pkgdocdir}" > files_section.txt
|
||||
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/
|
||||
|
||||
%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
|
||||
%if %{with collection}
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_install
|
||||
popd
|
||||
%else
|
||||
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/collections $RPM_BUILD_ROOT%{_datadir}/ansible/
|
||||
%endif
|
||||
|
||||
# install collection_artifact
|
||||
%if %{with collection_artifact}
|
||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files -f files_section.txt
|
||||
%dir %{_datadir}/ansible
|
||||
%dir %{_datadir}/ansible/roles
|
||||
%doc %{_pkgdocdir}/*/README.md
|
||||
%license %{_pkgdocdir}/*/LICENSE
|
||||
%{_datadir}/ansible/roles/*
|
||||
|
||||
%if %{with html}
|
||||
%{_pkgdocdir}/*/README.html
|
||||
%endif
|
||||
%if %{with collection}
|
||||
%{ansible_collection_files}
|
||||
%else
|
||||
%{_datadir}/ansible/collections
|
||||
%endif
|
||||
%if %{with collection_artifact}
|
||||
%files collection-artifact
|
||||
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Feb 05 2024 Than Ngo <than@redhat.com> - 3.6.0-2
|
||||
- sap_hypervisor_node_preconfigure: fix for role name and path for included tasks
|
||||
- update collection files
|
||||
Related: RHEL-16897
|
||||
|
||||
* Thu Jan 25 2024 Than Ngo <than@redhat.com> - 3.6.0-1
|
||||
- rebase sap roles to version 1.3.4
|
||||
- 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
|
||||
- updated README.md files for sap and sap_swpm roles
|
||||
- migrated to SPDX license
|
||||
- converted patch macro use to the most compatible syntax
|
||||
- rebased sap roles to version 1.2.3
|
||||
Resolves: #2185037
|
||||
|
||||
|
||||
* Mon Jan 30 2023 Than Ngo <than@redhat.com> - 3.4.0-3
|
||||
- Related: #2155876, rebase sap roles to version 1.2.1
|
||||
|
||||
* 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
|
||||
- add tsx=on to the kernel command line unconditionally
|
||||
|
||||
* Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-5
|
||||
- Related: #1928398, fix yum group install errors on RHEL 7
|
||||
|
||||
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-4
|
||||
- Related: #1928398, fix #149, #177, #193, #194
|
||||
|
||||
* Mon Jul 12 2021 Than Ngo <than@redhat.com> - 3.1.1-3
|
||||
- add missing __sap_preconfigure_envgroups for RHEL 7.x
|
||||
- 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
|
||||
- Related: #1928398, add missing changelogs
|
||||
|
||||
* Tue Jun 29 2021 Than Ngo <than@redhat.com> - 3.1.1-1
|
||||
- Resolves: #1928398, rebase to 3.1.1 for Ansible Collections
|
||||
|
||||
* Fri Mar 05 2021 Than Ngo <than@redhat.com> - 3.0.1-4
|
||||
- fixed issue #130 in sap-preconfigure
|
||||
- fixed typos in README.md in sap_hana_preconfigure
|
||||
- added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md
|
||||
- fixed issue #170 in sap_hana_preconfigure
|
||||
Related: #1891642
|
||||
|
||||
* 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
|
||||
|
||||
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-2
|
||||
- Related: #1891642, update sap-hana-preconfigure 3.0.1 and fixed Urls
|
||||
|
||||
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-1
|
||||
- Related: #1891642, rebase to 3.0.1
|
||||
|
||||
* Mon Feb 15 2021 Than Ngo <than@redhat.com> - 3.0.0-2
|
||||
- Related: #1891642, more fixes #145, #148, #149, #150 #147
|
||||
|
||||
* Thu Jan 28 2021 Than Ngo <than@redhat.com> - 3.0.0-1
|
||||
- Resolves: #1891638, bug fixes
|
||||
- Resolves: #1891642, new features
|
||||
|
||||
* Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7
|
||||
- Related: #1867027, fix #119
|
||||
|
||||
* Thu Aug 20 2020 Than Ngo <than@redhat.com> - 2.0.0-6
|
||||
- Related: #1867027, fix #92
|
||||
|
||||
* Fri Aug 07 2020 Than Ngo <than@redhat.com> - 2.0.0-5
|
||||
- Resolves: #1867027, more fixes for #89, #109, #110, #111, #112, #113, #114, #116
|
||||
|
||||
* Tue Jul 21 2020 Than Ngo <than@redhat.com> - 2.0.0-4
|
||||
- Related: #1844190, more fixes for #84, #85, #86, #88, #98, #104, #105, #107
|
||||
|
||||
* Fri Jul 03 2020 Than Ngo <than@redhat.com> - 2.0.0-3
|
||||
- Related: #1844190, drop 1944799.yml
|
||||
|
||||
* Mon Jun 29 2020 Than Ngo <than@redhat.com> - 2.0.0-2
|
||||
- Related: #1844190, more fixes for #78, #79, #81, #82, #94-#97, #99, #101-#102
|
||||
|
||||
* Mon Jun 08 2020 Than Ngo <than@redhat.com> - 2.0.0-1
|
||||
- Resolves: #1844190, rebase to 2.0.0
|
||||
|
||||
* Thu May 07 2020 Than Ngo <than@redhat.com> - 1.1.1-2
|
||||
- Resolves: #1829495, fix summary
|
||||
|
||||
* Mon Oct 21 2019 Than Ngo <than@redhat.com> - 1.1.1-1
|
||||
- rebase to 1.1.1
|
||||
- always use ansible_hostname + ansible_domain instead of ansible_fqdn
|
||||
- use {{ ansible_hostname }}.{{ ansible_domain }} instead of {{ ansible_fqdn }}
|
||||
- added LC_ALL=C before commands for which the outputs are to be evaluated
|
||||
|
||||
* Thu Sep 12 2019 Than Ngo <than@redhat.com> - 1.1-1
|
||||
- rebase to 1.1
|
||||
|
||||
* Fri Jun 28 2019 Than Ngo <than@redhat.com> - 1.0-1
|
||||
- Initial release.
|
||||
199
redhat.sap_install-fix-readme.patch
Normal file
199
redhat.sap_install-fix-readme.patch
Normal file
@ -0,0 +1,199 @@
|
||||
diff -Nur redhat.sap_install-1.8.0-old/FILES.json redhat.sap_install-1.8.0-new/FILES.json
|
||||
--- redhat.sap_install-1.8.0-old/FILES.json 2026-01-23 14:39:53.000000000 +0100
|
||||
+++ redhat.sap_install-1.8.0-new/FILES.json 2026-02-10 11:36:36.764838266 +0100
|
||||
@@ -4386,7 +4386,7 @@
|
||||
"name": "README.md",
|
||||
"ftype": "file",
|
||||
"chksum_type": "sha256",
|
||||
- "chksum_sha256": "b12c32a53e9d48a3c6295ee85af6e0356455a94a144c2fd8b56f9ddcc4a7eef0",
|
||||
+ "chksum_sha256": "11ac1c5b7bee78deb7f03bccc3ee88d7ea4976a4efa061a64a18de04fa121056",
|
||||
"format": 1
|
||||
},
|
||||
{
|
||||
@@ -4580,4 +4580,4 @@
|
||||
}
|
||||
],
|
||||
"format": 1
|
||||
-}
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
+}
|
||||
diff -Nur redhat.sap_install-1.8.0-old/MANIFEST.json redhat.sap_install-1.8.0-new/MANIFEST.json
|
||||
--- redhat.sap_install-1.8.0-old/MANIFEST.json 2026-01-23 14:39:53.000000000 +0100
|
||||
+++ redhat.sap_install-1.8.0-new/MANIFEST.json 2026-02-10 11:37:58.664730939 +0100
|
||||
@@ -37,8 +37,8 @@
|
||||
"name": "FILES.json",
|
||||
"ftype": "file",
|
||||
"chksum_type": "sha256",
|
||||
- "chksum_sha256": "cbdd2d72ec9185720895b797a9b03d64af2765199dd4c52a4c24d975f557e322",
|
||||
+ "chksum_sha256": "2f3c921a3c3ab859ae6346b0138ccaa6d3979f629da166de81fd8cbe1a05b2e2",
|
||||
"format": 1
|
||||
},
|
||||
"format": 1
|
||||
-}
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
+}
|
||||
diff -Nur redhat.sap_install-1.8.0-old/README.md redhat.sap_install-1.8.0-new/README.md
|
||||
--- redhat.sap_install-1.8.0-old/README.md 2026-01-23 14:39:53.000000000 +0100
|
||||
+++ redhat.sap_install-1.8.0-new/README.md 2026-02-10 12:09:47.175588100 +0100
|
||||
@@ -1,15 +1,148 @@
|
||||
-# redhat sap_install collections
|
||||
+# redhat.sap_install Ansible Collection
|
||||
|
||||
+
|
||||
|
||||
-### Supported Roles
|
||||
+## Description
|
||||
|
||||
-<!--ts-->
|
||||
- * sap_maintain_etc_hosts
|
||||
- * sap_general_preconfigure
|
||||
- * sap_netweaver_preconfigure
|
||||
- * sap_hana_preconfigure
|
||||
- * sap_hana_install
|
||||
- * sap_ha_install_hana_hsr
|
||||
- * sap_ha_pacemaker_cluster
|
||||
- * sap_swpm
|
||||
-<!--te-->
|
||||
+This Ansible Collection executes various SAP Software installations and configuration tasks for various SAP solutions and deployment scenarios on RHEL for SAP Solutions
|
||||
+
|
||||
+ - **Preparing RHEL 8, RHEL 9 and RHEL 10 systems for the installation of SAP HANA and NetWeaver software**
|
||||
+ - **Installing SAP HANA standalone and scale-out in a non clustered environment**
|
||||
+ - **Configuring SAP HANA scale-up in a 2-node Pacemaker cluster**
|
||||
+ - **Configuring (A)SCS and ERS in a Pacemaker cluster**
|
||||
+ - **Installing SAP software via the SAP Software Provisioning Manager (SWPM)**
|
||||
+
|
||||
+ - *NOTE*: This version of the collection redhat.sap_install contains the role `sap_swpm` with a support scope of *Fully Supported*
|
||||
+ for the following deployment scenarios:
|
||||
+ S/4HANA 2021 and later single-host installation on x86_64 and ppc64le: RHEL 8.10, 9.2, 9.4, 9.6 and 10.0.
|
||||
+
|
||||
+ All other functionality of this role is currently not supported by Red Hat.
|
||||
+
|
||||
+ It might happen that the installation of the ABAP Platform system (SAP NetWeaver) fails because of an incorrectly
|
||||
+ configured role variable, and that it is not possible for Red Hat to determine the root cause from the SWPM log and
|
||||
+ trace files. In these cases, Red Hat may ask you to provide the file inifile.params from a successful interactive
|
||||
+ installation or to use this file as the input parameter file by the role sap_swpm, stored on the managed node in the
|
||||
+ directory specified in `sap_swpm_inifile_directory`.
|
||||
+
|
||||
+## Requirements
|
||||
+
|
||||
+### Control Nodes
|
||||
+Operating system:
|
||||
+- Red Hat Enterprise Linux for SAP Solutions 8.x 9.x 10.x
|
||||
+
|
||||
+Python: 3.9 or higher
|
||||
+
|
||||
+Ansible-core: 2.14 or higher
|
||||
+
|
||||
+### Managed Nodes
|
||||
+Operating system:
|
||||
+- Red Hat Enterprise Linux for SAP Solutions 8.x 9.x 10.x
|
||||
+
|
||||
+**NOTE: Operating system needs to have access to required package repositories either directly or via subscription registration.**
|
||||
+
|
||||
+Python: 3.6 or higher
|
||||
+
|
||||
+
|
||||
+## Installation Instructions
|
||||
+
|
||||
+### Installation
|
||||
+Install this collection with Ansible Galaxy command:
|
||||
+```console
|
||||
+ansible-galaxy collection install redhat.sap_install
|
||||
+```
|
||||
+
|
||||
+Optionally you can include collection in requirements.yml file and include it together with other collections using: `ansible-galaxy collection install -r requirements.yml`
|
||||
+Requirements file need to be maintained in following format:
|
||||
+```yaml
|
||||
+collections:
|
||||
+ - name: redhat.sap_install
|
||||
+```
|
||||
+
|
||||
+### Upgrade
|
||||
+Installed Ansible Collection will not be upgraded automatically when Ansible package is upgraded.
|
||||
+
|
||||
+To upgrade the collection to the latest available version, run the following command:
|
||||
+```console
|
||||
+ansible-galaxy collection install redhat.sap_install --upgrade
|
||||
+```
|
||||
+
|
||||
+You can also install a specific version of the collection, when you encounter issues with latest version. Please report these issues in affected Role repository if that happens.
|
||||
+Example of downgrading collection to version 1.4.0:
|
||||
+```
|
||||
+ansible-galaxy collection install redhat.sap_install:==1.4.0
|
||||
+```
|
||||
+
|
||||
+See [Installing collections](https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html) for more details on installation methods.
|
||||
+
|
||||
+
|
||||
+## Use Cases
|
||||
+
|
||||
+### Example Scenarios
|
||||
+- Preparation of Operating system for SAP installation
|
||||
+- Preparation of SAP installation media for SAP installation
|
||||
+- Installation of SAP HANA (including High Availability with replication) or Oracle Database
|
||||
+- Installation of SAP S4HANA or other SAP products
|
||||
+- Configuration of Pacemaker cluster for SAP HANA and SAP Netweaver
|
||||
+
|
||||
+More deployment scenarios are available in [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) repository.
|
||||
+
|
||||
+### Ansible Roles
|
||||
+All included roles can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks.
|
||||
+
|
||||
+| Name | Summary | Support |
|
||||
+| :--- | :--- | :--- |
|
||||
+| [sap_maintain_etc_hosts](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_maintain_etc_hosts) | maintain /etc/hosts entries for SAP systems | Fully Supported |
|
||||
+| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general OS settings for SAP software | Fully Supported |
|
||||
+| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | Fully Supported |
|
||||
+| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | Fully Supported |
|
||||
+| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | Fully Supported |
|
||||
+| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | Fully Supported |
|
||||
+| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | Fully Supported |
|
||||
+| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | Fully Supported (for certain functionality only) |
|
||||
+
|
||||
+## Testing
|
||||
+This Ansible Collection was tested across different Operating Systems, SAP products and scenarios. You can find examples of some of them below.
|
||||
+
|
||||
+Operating systems:
|
||||
+- Red Hat Enterprise Linux for SAP Solutions 8.x 9.x 10.x (RHEL4SAP)
|
||||
+
|
||||
+Deployment scenarios:
|
||||
+- All scenarios included in [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) repository
|
||||
+
|
||||
+SAP Products:
|
||||
+- SAP S/4HANA AnyPremise (1809, 1909, 2020, 2021, 2022, 2023) with setup as Standard, Distributed, High Availability and optional Maintenance Planner or Restore System Copy
|
||||
+- SAP Business Suite (ECC) on HANA and SAP Business Suite (ECC) with SAP AnyDB - SAP ASE, SAP MaxDB, IBM Db2, Oracle DB
|
||||
+- SAP BW/4HANA (2021, 2023) with setup as Standard or Scale-Out
|
||||
+- SAP HANA 2.0 (SPS04+) with setup as Scale-Up, Scale-Out, High Availability
|
||||
+- Other SAP installation activities; such as System Rename, System Copy Export, SAP Solution Manager and SAP Web Dispatcher
|
||||
+
|
||||
+**NOTE: It is not possible to test every Operating System and SAP Product combination with every release. Testing is regularly done for common scenarios: SAP HANA, SAP HANA HA, SAP S4HANA Distributed HA**
|
||||
+
|
||||
+
|
||||
+## Contributing
|
||||
+For information on how to contribute, please see our [contribution guidelines](https://sap-linuxlab.github.io/initiative_contributions/).
|
||||
+
|
||||
+
|
||||
+## Contributors
|
||||
+We welcome contributions to this collection. For a list of all contributors and information on how you can get involved, please see our [CONTRIBUTORS document](./CONTRIBUTORS.md).
|
||||
+
|
||||
+
|
||||
+## Support
|
||||
+You can report any issues using [Issues](https://github.com/sap-linuxlab/community.sap_install/issues) section.
|
||||
+
|
||||
+
|
||||
+## Release Notes and Roadmap
|
||||
+You can find the release notes of this collection in [Changelog file](https://github.com/sap-linuxlab/community.sap_install/blob/main/CHANGELOG.rst)
|
||||
+
|
||||
+
|
||||
+## Further Information
|
||||
+
|
||||
+### Variable Precedence Rules
|
||||
+Please follow [Ansible Precedence guidelines](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) on how to pass variables when using this collection.
|
||||
+
|
||||
+### Getting Started
|
||||
+More information on how to execute Ansible playbooks is in [Getting started guide](https://github.com/sap-linuxlab/community.sap_install/blob/main/docs/getting_started/README.md).
|
||||
+
|
||||
+
|
||||
+## License
|
||||
+[Apache 2.0](https://github.com/sap-linuxlab/community.sap_install/blob/main/LICENSE)
|
||||
Binärdateien redhat.sap_install-1.8.0-old/redhat-sap_install-1.8.0.tar.gz und redhat.sap_install-1.8.0-new/redhat-sap_install-1.8.0.tar.gz sind verschieden.
|
||||
310
rhel-system-roles-sap.spec
Normal file
310
rhel-system-roles-sap.spec
Normal file
@ -0,0 +1,310 @@
|
||||
# disable collection_artifact by default
|
||||
%bcond_with collection_artifact
|
||||
|
||||
# disable collection by default since version 3.6.0 (1.3.5)
|
||||
%bcond_with collection
|
||||
|
||||
# remove sap_vm_preconfigure from sap_infrastructure (since version 1.1.3)
|
||||
%global remove_sap_vm_preconfigure 1
|
||||
|
||||
%global collection_name_sap_install sap_install
|
||||
%global collection_name_sap_infrastructure sap_infrastructure
|
||||
|
||||
%if 0%{?rhel}
|
||||
%global package_name rhel-system-roles-sap
|
||||
%global collection_namespace redhat
|
||||
%else
|
||||
%global package_name linux-system-roles-sap
|
||||
%global collection_namespace community
|
||||
%endif
|
||||
|
||||
# collection_version has to be increased by every rebuild
|
||||
# otherwise, it cannot be uploaded to Automation Hub and Galaxy
|
||||
# due to version conflict
|
||||
%global collection_sap_install_version 1.8.0
|
||||
%global collection_sap_infrastructure_version 1.3.1
|
||||
%global build_tool_version 1.7.1
|
||||
|
||||
%global collection_dir_sap_install collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_install}
|
||||
%global collection_dir_sap_infrastructure collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_infrastructure}
|
||||
%global mainid 1.108.0
|
||||
%global mainid_build_tools %{build_tool_version}
|
||||
%global commit_id_sap_install %{collection_sap_install_version}
|
||||
%global commit_id_sap_infrastructure %{collection_sap_infrastructure_version}
|
||||
# roles sap_install, to get the list of supported roles: ls -l redhat.sap_install-*/roles/
|
||||
%global rolename1 sap_general_preconfigure
|
||||
%global rolename2 sap_ha_install_hana_hsr
|
||||
%global rolename3 sap_hana_install
|
||||
%global rolename4 sap_hana_preconfigure
|
||||
%global rolename5 sap_ha_pacemaker_cluster
|
||||
%global rolename6 sap_maintain_etc_hosts
|
||||
%global rolename7 sap_netweaver_preconfigure
|
||||
%global rolename8 sap_swpm
|
||||
# roles sap_infrastructure, to get the list of supported roles: ls -l redhat.sap_infrastructure-*/roles/
|
||||
%global rolename20 sap_hypervisor_node_preconfigure
|
||||
%if %{remove_sap_vm_preconfigure}
|
||||
%global rolename21 %nil
|
||||
%else
|
||||
%global rolename21 sap_vm_preconfigure
|
||||
%endif
|
||||
%global rolename22 sap_vm_provision
|
||||
%global src_owner linux-system-roles
|
||||
%global github_repo_sap_install redhat.sap_install
|
||||
%global github_repo_sap_infrastructure redhat.sap_infrastructure
|
||||
%global rolename_sap_install %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename6} %{rolename7} %{rolename8}
|
||||
%global rolename_sap_infrastructure %{rolename20} %{rolename21} %{rolename22}
|
||||
%global rolenames %{rolename_rhel}
|
||||
|
||||
Name: %{package_name}
|
||||
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
|
||||
Version: 3.9.0
|
||||
Release: 2%{?dist}
|
||||
License: GPL-3.0-or-later
|
||||
Url: https://github.com/redhat-sap/community.sap_install
|
||||
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
|
||||
Source2: https://github.com/redhat-sap/redhat.sap_infrastructure/archive/%{commit_id_sap_infrastructure}/%{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}.tar.gz
|
||||
Source3: https://github.com/ngothan/build-tools/archive/%{mainid_build_tools}/build-tools-%{mainid_build_tools}.tar.gz
|
||||
# Fix README.md
|
||||
Patch1: redhat.sap_install-fix-readme.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: rhel-system-roles
|
||||
|
||||
BuildRequires: tar
|
||||
|
||||
# Requirements for galaxy_transform.py
|
||||
BuildRequires: python3-ruamel-yaml
|
||||
Requires: python3-jmespath
|
||||
Requires: python3-netaddr
|
||||
|
||||
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
|
||||
# in buildroot as it depended on modular Python.
|
||||
# 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
|
||||
%if %{undefined __ansible_provides}
|
||||
Provides: ansible-collection(%{collection_namespace}.%{collection_name_sap_install}) = %{version}
|
||||
Provides: ansible-collection-%{collection_namespace}.%collection_name_sap_infrastructure} = %{version}
|
||||
%endif
|
||||
# be compatible with the usual Fedora Provides:
|
||||
Provides: ansible-collection-%{collection_namespace}-%{collection_name_sap_install} = %{version}-%{release}
|
||||
Provides: ansible-collection-%{collection_namespace}-%collection_name_sap_infrastructure} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
# 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_sap_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name_sap_install}-%{collection_sap_install_version}.tar.gz
|
||||
%define ansible_collection_infrastructure_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name_sap_infrastructure}-%{collection_sap_infrastructure_version}.tar.gz
|
||||
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
||||
|
||||
%description
|
||||
Collection of Ansible roles which configures a RHEL system according
|
||||
to applicable SAP notes so that any SAP software can be installed.
|
||||
|
||||
%if %{with collection_artifact}
|
||||
%package collection-artifact
|
||||
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
||||
|
||||
%description collection-artifact
|
||||
Collection artifact for %{name}. This package contains:
|
||||
* %{collection_namespace}-%{collection_name_sap_install}-%{collection_sap_install_version}.tar.gz
|
||||
* %{collection_namespace}-%{collection_name_sap_infrastructure}-%{collection_sap_infrastructure_version}.tar.gz
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid}
|
||||
# Fix README.md
|
||||
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/
|
||||
%patch -P1 -p1
|
||||
popd
|
||||
|
||||
# unpack collection tar files
|
||||
%if %{without collection}
|
||||
mkdir -p %{collection_dir_sap_install} %{collection_dir_sap_infrastructure}
|
||||
|
||||
# sap_install collection
|
||||
tar xf %{github_repo_sap_install}-%{commit_id_sap_install}/%{collection_namespace}-%{collection_name_sap_install}-%{collection_sap_install_version}.tar.gz -C %{collection_dir_sap_install}
|
||||
# Fix the README.md in sap_install bundle
|
||||
cp -f %{github_repo_sap_install}-%{commit_id_sap_install}/README.md %{collection_dir_sap_install}/
|
||||
|
||||
# sap_infrastructure collection
|
||||
tar xf %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/%{collection_namespace}-%{collection_name_sap_infrastructure}-%{commit_id_sap_infrastructure}.tar.gz -C %{collection_dir_sap_infrastructure}
|
||||
%endif
|
||||
|
||||
# remove zero file and symlinks
|
||||
find . -type f -size 0 -delete
|
||||
find . -type l -delete
|
||||
|
||||
# fix python and bash shebangs
|
||||
find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!/usr/bin/python3=' {} +
|
||||
find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */bin/bash=#!/usr/bin/bash=' {} +
|
||||
find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */usr/bin/env bash=#!/usr/bin/bash=' {} +
|
||||
|
||||
|
||||
%build
|
||||
%if %{with collection}
|
||||
# create dest-path
|
||||
mkdir .collections
|
||||
|
||||
for role in %{rolename_sap_install} ; do
|
||||
echo "Handling role $role..."
|
||||
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_sap_install} \
|
||||
--new-role "$role"
|
||||
done
|
||||
|
||||
for role in %{rolename_sap_infrastructure} ; do
|
||||
echo "Handling role $role..."
|
||||
python3 lsr_role2collection.py --role "$role" \
|
||||
--src-path %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/roles/"$role" \
|
||||
--src-owner %{src_owner} \
|
||||
--dest-path .collections \
|
||||
--namespace %{collection_namespace} \
|
||||
--collection %{collection_name_sap_infrastructure} \
|
||||
--new-role "$role"
|
||||
done
|
||||
|
||||
# update galaxy.yml
|
||||
cp -av %{github_repo_sap_install}-%{commit_id_sap_install}/galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_install}/
|
||||
cp -av %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_infrastructure}/
|
||||
|
||||
# Build the sap_install collection
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_install}/
|
||||
%ansible_collection_build
|
||||
popd
|
||||
|
||||
# Build the sap_infrastructure collection
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_infrastructure}/
|
||||
%ansible_collection_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}
|
||||
|
||||
# create file selection for documents
|
||||
echo "%dir %{_pkgdocdir}" > files_section.txt
|
||||
cp -afv %{github_repo_sap_install}-%{commit_id_sap_install}/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/
|
||||
|
||||
echo "%{_pkgdocdir}/README.*" >> files_section.txt
|
||||
|
||||
# install sap_install roles
|
||||
for role in %{rolename_sap_install} ; 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/
|
||||
echo "%dir %{_pkgdocdir}/$role" >> files_section.txt
|
||||
done
|
||||
|
||||
# install sap_infrastructure roles
|
||||
for role in %{rolename_sap_infrastructure} ; do
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/$role
|
||||
cp -pR %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/roles/$role $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
|
||||
install -m 644 %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/LICENSE \
|
||||
%{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/roles/$role/README.md \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
|
||||
echo "%dir %{_pkgdocdir}/$role" >> files_section.txt
|
||||
done
|
||||
|
||||
# install collection files
|
||||
%if %{with collection}
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_install}/
|
||||
%ansible_collection_sap_install
|
||||
popd
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_infrastructure}/
|
||||
%ansible_collection_infrastructure_install
|
||||
popd
|
||||
# update CHANGELOG.rst playbooks FILES.json README.md MANIFEST.json
|
||||
for f in CHANGELOG.rst playbooks FILES.json README.md MANIFEST.json ; do
|
||||
cp -afv %{github_repo_sap_install}-%{commit_id_sap_install}/$f $RPM_BUILD_ROOT/%{ansible_collection_files}/%{collection_name_sap_install}/
|
||||
cp -afv %{github_repo_sap_infrastructure}-%{commit_id_sap_infrastructure}/$f $RPM_BUILD_ROOT/%{ansible_collection_files}/%{collection_name_sap_infrastructure}/
|
||||
done
|
||||
%else
|
||||
cp -pR collections $RPM_BUILD_ROOT%{_datadir}/ansible/
|
||||
%endif
|
||||
|
||||
# install collection_artifact
|
||||
%if %{with collection_artifact}
|
||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_install}/
|
||||
mv %{collection_namespace}-%{collection_name_sap_install}-%{collection_sap_install_version}.tar.gz \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||
popd
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name_sap_infrastructure}/
|
||||
mv %{collection_namespace}-%{collection_name_sap_infrastructure}-%{collection_sap_infrastructure_version}.tar.gz \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
%files -f files_section.txt
|
||||
%dir %{_datadir}/ansible
|
||||
%dir %{_datadir}/ansible/roles
|
||||
%doc %{_pkgdocdir}/*/README.md
|
||||
%license %{_pkgdocdir}/*/LICENSE
|
||||
%{_datadir}/ansible/roles/*
|
||||
%if %{with collection}
|
||||
%{ansible_collection_files}
|
||||
%else
|
||||
%{_datadir}/ansible/collections
|
||||
%endif
|
||||
%if %{with collection_artifact}
|
||||
%files collection-artifact
|
||||
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name_sap_install}-%{collection_sap_install_version}.tar.gz
|
||||
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name_sap_infrastructure}-%{collection_sap_infrastructure_version}.tar.gz
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Feb 10 2026 Than Ngo <than@redhat.com> - 3.9.0-2
|
||||
- sap_infrastructure-1.3.1, bugfix for the webhook endpoint issue
|
||||
- sap_install-1.8.0: fix README.md
|
||||
Resolves: RHEL-139702
|
||||
|
||||
* Wed Feb 04 2026 Than Ngo <than@redhat.com> - 3.9.0-1
|
||||
- include sap_infrastructure-1.3.0 and sap_install-1.8.0
|
||||
Resolves: RHEL-139702
|
||||
|
||||
* Wed Aug 13 2025 Than Ngo <than@redhat.com> - 3.8.7-1
|
||||
- Drop test files
|
||||
- include sap_infrastructure-1.1.3 and sap_install-1.7.1
|
||||
Resolves: RHEL-96862
|
||||
|
||||
* Tue Jun 24 2025 Than Ngo <than@redhat.com> - 3.8.6-3
|
||||
- Related: RHEL-96862, added missing vars for 9.9/9.10 for sap_hana_preconfigure
|
||||
|
||||
* Tue Jun 24 2025 Than Ngo <than@redhat.com> - 3.8.6-2
|
||||
- Fix missing sap_hana_preconfigure_repos for rhel-10.1
|
||||
- Fix kernel command line for SELinux on RHEL-10
|
||||
Related: RHEL-96862
|
||||
|
||||
* Sun Jun 22 2025 Than Ngo <than@redhat.com> - 3.8.6-1
|
||||
- Resolves: RHEL-96862, include new collcection redhat.sap_install and redhat.sap_infrastructure
|
||||
|
||||
* Wed Feb 05 2025 Than Ngo <than@redhat.com> - 3.8.5-1
|
||||
- Fix check mode for largesend.conf on ppc64le
|
||||
- Fix the package name of the RHEL 10 Power tools
|
||||
Related: RHEL-73378
|
||||
|
||||
* Tue Feb 04 2025 Than Ngo <than@redhat.com> - 3.8.4-1
|
||||
- Related: RHEL-73378, Fix checkmode for sysctl and in sap_hana_preconfigure
|
||||
|
||||
* Wed Jan 29 2025 Than Ngo <than@redhat.com> - 3.8.2-1
|
||||
- Resolves: RHEL-73378, new collcection redhat.sap_install, redhat.sap_infrastructure
|
||||
|
||||
* Tue May 14 2024 Than Ngo <than@redhat.com> - 3.7.0-1
|
||||
- Resolves: RHEL-35274, rebase sap roles to version 1.3.7
|
||||
|
||||
* Thu May 02 2024 Than Ngo <than@redhat.com> - 3.6.0-5
|
||||
- Resolves: RHEL-33364, import and build for rhel-10-beta
|
||||
4
sources
Normal file
4
sources
Normal file
@ -0,0 +1,4 @@
|
||||
SHA512 (auto-maintenance-1.108.0.tar.gz) = 9dedac13ab05113ca474476189b57f6cc9aa12ff07a0acf7f4a0b56ff7b06c5cb84f10e2979a62cc3e94490b00d7032c035ee32e73d6025a5a0a6183b8ccc478
|
||||
SHA512 (build-tools-1.7.1.tar.gz) = ceddd2434a72dbb696c347746b789898c23a31f2c19b8366f69e977a118e26f07eb8d9eca63c6bc5bd45e0b88e473050f88805e38fe61019bca3a30d29e22e16
|
||||
SHA512 (redhat.sap_infrastructure-1.3.1.tar.gz) = 37991a26480e17149e61360a33bc0cfa83414e4ce5ef3f32bc101bd56c5149ffe4d5127a81b4f675df89dbccba1afb57f32619e0f62e8151ac7d9a2c4759e541
|
||||
SHA512 (redhat.sap_install-1.8.0.tar.gz) = 3829eb4d644757b5eede6ca9017cec48dfe4c17c31c65a02e98538fdb4a96c8bd1d0ba5237dd8b3e3d1f579aaff75f3392e7ad95f5f66a11354cfc694fc8b363
|
||||
Loading…
Reference in New Issue
Block a user