From 16721a4c267bc0bf324a15106bd5cec83fd6a183 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 2 Jul 2021 12:25:57 +0200 Subject: [PATCH] Resolves: #1977195, make RHEL system roles for SAP RHEL9 compatible --- .gitignore | 6 + gating.yaml | 2 +- rhel-system-roles-sap.spec | 339 +++++++++++----- ...73dd09715cfcf69bcf3c1f4347225028ba70.patch | 19 - ...092d5063c2fb0d7996775521a52549e3a65a.patch | 213 ---------- ...f9b667a8a7dec17caa70c5df929b921691a6.patch | 54 --- ...7c964e2c95b37c68299e6077bc3f987faffb.patch | 99 ----- ...2367321b47c3fb5d52e50f5ea220c548fab5.patch | 105 ----- ...fb58325bf1c370ea3e0d76e291eb9485acf1.patch | 116 ------ ...1339a1a79c9e47f8023534e0a3db429dbf20.patch | 47 --- ...52ada59c5e2919be3f7cf89927ac7bfd510d.patch | 30 -- ...52ada59c5e2919be3f7cf89927ac7bfd510d.patch | 19 - ...c5470eae0769a6ceee201621aab0518bb6f3.patch | 50 --- ...979fa05e938165c95a134bbdcc37a33f4eea.patch | 370 ------------------ ...988bf105a325db12965d240bbe1462b72c78.patch | 61 --- ...940d0230c0fb2957426952c5308e08919c06.patch | 18 - ...c33e9a8eddb633189d332683309d398fd54f.patch | 234 ----------- ...88a8354bf14f665e2ec92ff6b49f6828edfc.patch | 85 ---- ...7012022f38534ae5a5803062639446c9fa81.patch | 41 -- ...15413b0bd7741bd6d8e06e5676be36a24c41.patch | 37 -- sap-hana-preconfigure-2.0.0.patch | 82 ---- sap-hana-preconfigure-md2html-error.patch | 19 + ...5e39a38070ac0b3fe9f2f447d60e6eedac4a.patch | 125 ------ ...297b1e54662773d9b63850fdae34d2606fa1.patch | 82 ---- ...5f40569044307bbf41038b766ff571a08025.patch | 41 -- ...0f9f8b0f7de3e48c1af041a0d63443445052.patch | 34 -- ...2082ae0784f88eab8f9d0f764c3981b9cf6d.patch | 42 -- ...afb7487687369d3597e6f9e21895da702094.patch | 43 -- ...870eaac2efee2e131babacebc5337a15b3e3.patch | 110 ------ ...b96fbd6a7360d62413734bc652ed4c5e2771.patch | 41 -- ...93eaddfafd08132017058b0b330108d2bd2c.patch | 53 --- ...d07c66286edbee756ed3504649975d333306.patch | 41 -- sources | 9 +- 33 files changed, 279 insertions(+), 2388 deletions(-) delete mode 100644 sap-hana-preconfigure-#101-063273dd09715cfcf69bcf3c1f4347225028ba70.patch delete mode 100644 sap-hana-preconfigure-#102-a622092d5063c2fb0d7996775521a52549e3a65a.patch delete mode 100644 sap-hana-preconfigure-#104-#105-6d65f9b667a8a7dec17caa70c5df929b921691a6.patch delete mode 100644 sap-hana-preconfigure-#107-6f8d7c964e2c95b37c68299e6077bc3f987faffb.patch delete mode 100644 sap-hana-preconfigure-#109-#110-89202367321b47c3fb5d52e50f5ea220c548fab5.patch delete mode 100644 sap-hana-preconfigure-#111-part1-03affb58325bf1c370ea3e0d76e291eb9485acf1.patch delete mode 100644 sap-hana-preconfigure-#111-part2-6edb1339a1a79c9e47f8023534e0a3db429dbf20.patch delete mode 100644 sap-hana-preconfigure-#112-part1-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch delete mode 100644 sap-hana-preconfigure-#112-part2-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch delete mode 100644 sap-hana-preconfigure-#113-1442c5470eae0769a6ceee201621aab0518bb6f3.patch delete mode 100644 sap-hana-preconfigure-#114-f011979fa05e938165c95a134bbdcc37a33f4eea.patch delete mode 100644 sap-hana-preconfigure-#116-752f988bf105a325db12965d240bbe1462b72c78.patch delete mode 100644 sap-hana-preconfigure-#119-75a1940d0230c0fb2957426952c5308e08919c06.patch delete mode 100644 sap-hana-preconfigure-#94-#97-ecb7c33e9a8eddb633189d332683309d398fd54f.patch delete mode 100644 sap-hana-preconfigure-#95-#96-c11288a8354bf14f665e2ec92ff6b49f6828edfc.patch delete mode 100644 sap-hana-preconfigure-#98-6a417012022f38534ae5a5803062639446c9fa81.patch delete mode 100644 sap-hana-preconfigure-#99-d64615413b0bd7741bd6d8e06e5676be36a24c41.patch delete mode 100644 sap-hana-preconfigure-2.0.0.patch create mode 100644 sap-hana-preconfigure-md2html-error.patch delete mode 100644 sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch delete mode 100644 sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch delete mode 100644 sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch delete mode 100644 sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch delete mode 100644 sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch delete mode 100644 sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch delete mode 100644 sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch delete mode 100644 sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch delete mode 100644 sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch delete mode 100644 sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch diff --git a/.gitignore b/.gitignore index 017e42a..f75f93a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ /sap-hana-preconfigure.tar.gz /sap-netweaver-preconfigure.tar.gz /sap-preconfigure.tar.gz +/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz +/sap-hana-preconfigure-9acfe7bb4b832303a302a728464a828b1ead7ca0.tar.gz +/sap-netweaver-preconfigure-337ba5580ba862e1adac59dcda8a126cdf561225.tar.gz +/sap-preconfigure-ce400b56d217571e2e9acd3e2558817333c673da.tar.gz +/galaxy.yml +/README.md diff --git a/gating.yaml b/gating.yaml index eb7c84f..c190bde 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-8 + - rhel-9 decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/rhel-system-roles-sap.spec b/rhel-system-roles-sap.spec index a5b4baf..2d8ceb3 100644 --- a/rhel-system-roles-sap.spec +++ b/rhel-system-roles-sap.spec @@ -1,108 +1,198 @@ -Name: rhel-system-roles-sap +%if 0%{?rhel} && ! 0%{?epel} +%bcond_with ansible +%else +%bcond_without ansible +%endif + +%bcond_with collection_artifact + +%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_namespace sap +%if 0%{?rhel} +%define package_name rhel-system-roles-sap +%global collection_name rhel +%else +%define package_name linux-system-roles-sap +%global collection_name linux +%endif + +%global mainid ec364d2e0bd422b69f34871a1188114f368097a0 +%global gitcommit_sap ce400b56d217571e2e9acd3e2558817333c673da +%global gitcommit_sap_hana 9acfe7bb4b832303a302a728464a828b1ead7ca0 +%global gitcommit_sap_netweaver 337ba5580ba862e1adac59dcda8a126cdf561225 +%global rolename1 sap-preconfigure +%global rolename2 sap-hana-preconfigure +%global rolename3 sap-netweaver-preconfigure +%global src_owner linux-system-roles + +Name: %{package_name} Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products -Version: 2.0.0 -Release: 8%{?dist} +Version: 3.1.1 +Release: 6%{?dist} License: GPLv3+ Url: https://github.com/berndfinger -Source0: https://github.com/berndfinger/sap-preconfigure/releases/download/2.0.0/sap-preconfigure.tar.gz -Source1: https://github.com/berndfinger/sap-hana-preconfigure/releases/download/2.0.0/sap-hana-preconfigure.tar.gz -Source2: https://github.com/berndfinger/sap-netweaver-preconfigure/releases/download/2.0.0/sap-netweaver-preconfigure.tar.gz -# git diff 2cbfd65fcc4988db4e9bc86bbf738217fe75bf49, fix 3 issues -# - firewalld installation state detection not working -# - File /etc/init.d/boot.local should have permissions of 0755 (configure-epb.yml) -# - ask disable-firewall.yml in 2009879_7.yml also needs single step execution support -# fixes for sap-hana-preconfigure -Patch0: sap-hana-preconfigure-2.0.0.patch -Patch1: sap-hana-preconfigure-#95-#96-c11288a8354bf14f665e2ec92ff6b49f6828edfc.patch -Patch2: sap-hana-preconfigure-#94-#97-ecb7c33e9a8eddb633189d332683309d398fd54f.patch -Patch3: sap-hana-preconfigure-#99-d64615413b0bd7741bd6d8e06e5676be36a24c41.patch -Patch4: sap-hana-preconfigure-#101-063273dd09715cfcf69bcf3c1f4347225028ba70.patch -Patch5: sap-hana-preconfigure-#102-a622092d5063c2fb0d7996775521a52549e3a65a.patch -Patch6: sap-hana-preconfigure-#104-#105-6d65f9b667a8a7dec17caa70c5df929b921691a6.patch -Patch7: sap-hana-preconfigure-#98-6a417012022f38534ae5a5803062639446c9fa81.patch -Patch8: sap-hana-preconfigure-#107-6f8d7c964e2c95b37c68299e6077bc3f987faffb.patch -Patch9: sap-hana-preconfigure-#109-#110-89202367321b47c3fb5d52e50f5ea220c548fab5.patch -Patch10: sap-hana-preconfigure-#111-part1-03affb58325bf1c370ea3e0d76e291eb9485acf1.patch -Patch11: sap-hana-preconfigure-#111-part2-6edb1339a1a79c9e47f8023534e0a3db429dbf20.patch -Patch12: sap-hana-preconfigure-#112-part1-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch -Patch13: sap-hana-preconfigure-#112-part2-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch -Patch14: sap-hana-preconfigure-#113-1442c5470eae0769a6ceee201621aab0518bb6f3.patch -Patch15: sap-hana-preconfigure-#114-f011979fa05e938165c95a134bbdcc37a33f4eea.patch -Patch16: sap-hana-preconfigure-#116-752f988bf105a325db12965d240bbe1462b72c78.patch -Patch17: sap-hana-preconfigure-#119-75a1940d0230c0fb2957426952c5308e08919c06.patch - -# fixes for sap-preconfigure -Patch100: sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch -Patch101: sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch -Patch102: sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch -Patch103: sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch -Patch104: sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch -Patch105: sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch -Patch106: sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch -Patch107: sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch -Patch108: sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch -Patch109: sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch +Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.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 +Source3: https://github.com/berndfinger/sap-netweaver-preconfigure/archive/%{gitcommit_sap_netweaver}/sap-netweaver-preconfigure-%{gitcommit_sap_netweaver}.tar.gz +Source4: README.md +Source5: galaxy.yml +# patches 0-49 for sap-preconfigure +# patches 50-99 for sap-hana-preconfigure +Patch50: sap-hana-preconfigure-md2html-error.patch +# patches 100-149 for sap-netweaver-preconfigur BuildArch: noarch -Requires: uuidd + + +%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 + +%if %{with ansible} +BuildRequires: ansible >= 2.9.10 +%endif + +%global collection_version %{version} + +%if %{undefined __ansible_provides} +Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version} +%endif +# be compatible with the usual Fedora Provides: +Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release} + +%{!?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 +%define ansible_collection_build() ansible-galaxy collection build +%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}-%{version}.tar.gz +%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}-%{version}.tar.gz +%endif + %prep -%setup -q -T -c -n %{name}-%{version} -a 0 -a 1 -a 2 +%setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid} + +# rename the source directories without gitcommit_sap +mv sap-preconfigure-%{gitcommit_sap} sap-preconfigure +mv sap-hana-preconfigure-%{gitcommit_sap_hana} sap-hana-preconfigure +mv sap-netweaver-preconfigure-%{gitcommit_sap_netweaver} sap-netweaver-preconfigure + +# 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 + pushd sap-hana-preconfigure -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -popd -pushd sap-preconfigure -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 +%patch50 -p1 popd -# remove all SLES stuff -rm -rf sap-hana-preconfigure/tasks/SLES -rm -rf sap-hana-preconfigure/tasks/SLES15 -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 -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/SLES_15.yml - -# remove all RHEL 6 stuff -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 -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 +# remove git stuff +rm -rf *-preconfigure/.git* +# remove zero file +rm -f sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml +# remove all SLES stuff and RHEL 6 stuff +rm -rf sap-hana-preconfigure/tasks/SLES/ +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 +rm -f sap-hana-preconfigure/tasks/sapnote/1944799.yml +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 +sh md2html.sh \ +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 + 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 + +# removing dot files/dirs +rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]* + +cp -p galaxy.yml lsr_role2collection/.ansible-lint \ + .collections/ansible_collections/%{collection_namespace}/%{collection_name} + +# build collection file +cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ +%ansible_collection_build %install mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ @@ -110,14 +200,27 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \ $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure -# drop zero file -rm -f */.gitignore sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml - cp -pR sap-hana-preconfigure sap-preconfigure sap-netweaver-preconfigure $RPM_BUILD_ROOT%{_datadir}/ansible/roles/ cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/ 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/ +# install collection files +pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ +%ansible_collection_install +popd + +# 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}/ +if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then + mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \ + $RPM_BUILD_ROOT%{_datadir}/ansible/collections/ +fi +popd +%endif + %files %dir %{_pkgdocdir} %dir %{_pkgdocdir}/sap-preconfigure @@ -128,8 +231,60 @@ cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir %doc %{_pkgdocdir}/*/README.md %license %{_pkgdocdir}/*/LICENSE %{_datadir}/ansible/roles/* +%{ansible_collection_files} + +%if %{with collection_artifact} +%files collection-artifact +%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}.tar.gz +%endif %changelog +* Tue Jun 29 2021 Than Ngo - 3.1.1-6 +- Resolves: #1977195, make RHEL system roles for SAP RHEL9 compatible + +* Mon Jun 28 2021 Than Ngo - 3.1.1-5 +- updated tarball, galaxy.yml, README.md + +* Mon Jun 07 2021 Than Ngo - 3.1.1-4 +- update README.md +- 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 - 3.1.1-3 +- convert roles to FQCN in the README files + +* Thu May 20 2021 Than Ngo - 3.1.1-2 +- rename dashes by underscores and drop sap- + +* Tue May 18 2021 Than Ngo - 3.1.1-1 +- rebase + +* Wed Apr 14 2021 Than Ngo - 3.1.0-3 +- bz#1928398, rebuilt against new python-ruamel-yaml-0.15.100 for conversion problem + +* Mon Mar 22 2021 Than Ngo - 3.1.0-2 +- rebase + +* Tue Mar 02 2021 Than Ngo - 3.1.0-1 +- added support Transfer SAP roles into collection format + +* Wed Feb 24 2021 Than Ngo - 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 - 3.0.1-2 +- Related: #1891642, update sap-hana-preconfigure 3.0.1 and fixed Urls + +* Thu Feb 18 2021 Than Ngo - 3.0.1-1 +- Related: #1891642, rebase to 3.0.1 + +* Mon Feb 15 2021 Than Ngo - 3.0.0-2 +- Related: #1891642, more fixes #145, #148, #149, #150 #147 + +* Thu Jan 28 2021 Than Ngo - 3.0.0-1 +- Resolves: #1891638, bug fixes +- Resolves: #1891642, new features + * Tue Jan 12 2021 Than Ngo - 2.0.0-8 - RHEL 9.0.0 Alpha build diff --git a/sap-hana-preconfigure-#101-063273dd09715cfcf69bcf3c1f4347225028ba70.patch b/sap-hana-preconfigure-#101-063273dd09715cfcf69bcf3c1f4347225028ba70.patch deleted file mode 100644 index a5310f8..0000000 --- a/sap-hana-preconfigure-#101-063273dd09715cfcf69bcf3c1f4347225028ba70.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 063273dd09715cfcf69bcf3c1f4347225028ba70 -Author: Bernd Finger -Date: Mon Jun 22 15:09:17 2020 +0200 - - "@" needs to be prepended to sap_hana_preconfigure_db_group_name - -diff --git a/tasks/sapnote/2772999.yml b/tasks/sapnote/2772999.yml -index 557ae32..538ff1a 100644 ---- a/tasks/sapnote/2772999.yml -+++ b/tasks/sapnote/2772999.yml -@@ -21,7 +21,7 @@ - - name: Set the hard and soft limit for the max number of open files per process (nproc) to unlimited for the database group - pam_limits: - dest: /etc/security/limits.d/99-sap.conf -- domain: "{{ sap_hana_preconfigure_db_group_name }} " -+ domain: "@{{ sap_hana_preconfigure_db_group_name }}" - limit_item: nproc - limit_type: "{{ line_item }}" - value: unlimited diff --git a/sap-hana-preconfigure-#102-a622092d5063c2fb0d7996775521a52549e3a65a.patch b/sap-hana-preconfigure-#102-a622092d5063c2fb0d7996775521a52549e3a65a.patch deleted file mode 100644 index 44bbe9e..0000000 --- a/sap-hana-preconfigure-#102-a622092d5063c2fb0d7996775521a52549e3a65a.patch +++ /dev/null @@ -1,213 +0,0 @@ -commit a622092d5063c2fb0d7996775521a52549e3a65a -Author: Bernd Finger -Date: Mon Jun 22 22:35:59 2020 +0200 - - some improvements according to pull request 100 feedbacks - variables should be in vars files in the same order as they are used in tasks - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index fcacce6..0a8e1c2 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -112,43 +112,20 @@ - {% endfor %} - {{ ns.pkgs }} - --# - name: check if minimum release needs to be installed --# shell: | --# set -x --# required_pkg={{ pkg | join('-') }} --# newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sed "s,\.el,.0.0.," | sort -V | tail -1) --# if [ $newest == ${required_pkg/.el/.0.0.} ]; then --# echo $newest --# fi --# loop: "{{ __sap_hana_preconfigure_min_pkgs }}" --# loop_control: --# loop_var: pkg --# check_mode: no --# register: sap_hana_preconfigure_register_minpkglist --# changed_when: false -- --# - name: Initialize an empty list for our strings --# set_fact: --# sap_hana_preconfigure_fact_minpkglist: [] -- --# - name: Create list of packages to be installed --# set_fact: --# sap_hana_preconfigure_fact_minpkglist: "{{ sap_hana_preconfigure_fact_minpkglist | difference(['']) + [ pkg.stdout ] }}" --# loop: "{{ sap_hana_preconfigure_register_minpkglist.results }}" --# loop_control: --# loop_var: pkg -- - - debug: var=sap_hana_preconfigure_fact_minpkglist - -+# yum: - - name: Install minimum packages if required -- yum: -+ package: - name: "{{ sap_hana_preconfigure_fact_minpkglist }}" - state: present -- when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) -+ when: sap_hana_preconfigure_fact_minpkglist | d([]) -+# when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) - - when: - - sap_hana_preconfigure_min_package_check|bool -- - not( (__sap_hana_preconfigure_min_pkgs is undefined) or (__sap_hana_preconfigure_min_pkgs is none) or (__sap_hana_preconfigure_min_pkgs | trim == '') ) -+ - __sap_hana_preconfigure_min_pkgs | d([]) -+# - not( (__sap_hana_preconfigure_min_pkgs is undefined) or (__sap_hana_preconfigure_min_pkgs is none) or (__sap_hana_preconfigure_min_pkgs | trim == '') ) - - - set_fact: - needs_restarting_command: "needs-restarting -r" -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 8ac6939..3978317 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -16,33 +16,6 @@ __sap_hana_preconfigure_sapnotes: - - "2292690" - - "2382421" - --# As per https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html : --__sap_hana_preconfigure_required_ppc64le: -- - librtas -- - src -- - rsct.core.utils -- - rsct.core -- - rsct.basic -- - rsct.opt.storagerm -- - devices.chrp.base.ServiceRM -- - DynamicRM -- - ncurses-libs -- - readline -- - sqlite -- - sg3_utils -- - libgcc -- - libstdc++ -- - zlib -- - iprutils -- - lsvpd -- - libvpd -- - libservicelog -- - servicelog -- - powerpc-utils -- - powerpc-utils-python -- - ppc64-diag -- - IBMinvscout -- - # In SAP Note 2235581, certain minimal required packages for the different RHEL 7 minor releases are listed. - # The following will assign them properly to __sap_hana_preconfigure_min_pkgs. - # If variable __sap_hana_preconfigure_min_packages_VERSION is not defined, -@@ -123,6 +96,33 @@ __sap_hana_preconfigure_packages: - # libtool-ltdl: See https://answers.sap.com/questions/476177/hana-db-installation-ended-with-exit-code-127.html - # This is required since HANA 2 SPS 03, and so we always install it. - -+# As per https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html : -+__sap_hana_preconfigure_required_ppc64le: -+ - librtas -+ - src -+ - rsct.core.utils -+ - rsct.core -+ - rsct.basic -+ - rsct.opt.storagerm -+ - devices.chrp.base.ServiceRM -+ - DynamicRM -+ - ncurses-libs -+ - readline -+ - sqlite -+ - sg3_utils -+ - libgcc -+ - libstdc++ -+ - zlib -+ - iprutils -+ - lsvpd -+ - libvpd -+ - libservicelog -+ - servicelog -+ - powerpc-utils -+ - powerpc-utils-python -+ - ppc64-diag -+ - IBMinvscout -+ - # Network related kernel parameters as set in SAP Note 2382421: - __sap_hana_preconfigure_kernel_parameters_default: - # The following two parameter should always be set: -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 3975dad..94d862b 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -19,37 +19,6 @@ __sap_hana_preconfigure_sapnotes: - - "2382421" - # - "2235581" # no specific requirements for RHEL 8 yet - --# The packages for RHEL8 are almost the same as for RHEL7. --# IBM publishes the packages as a repository here: --# https://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/RHEL/8/ppc64le/ --# To install the packages, you need to create an appropriate repofile --# or clone this repository (e.g. with Satellite product) --__sap_hana_preconfigure_required_ppc64le: -- - librtas -- - src -- - rsct.core.utils -- - rsct.core -- - rsct.basic -- - rsct.opt.storagerm -- - devices.chrp.base.ServiceRM -- - DynamicRM -- - ncurses-libs -- - readline -- - sqlite -- - sg3_utils -- - libgcc -- - libstdc++ -- - zlib -- - iprutils -- - lsvpd -- - libvpd -- - libservicelog -- - servicelog -- - powerpc-utils --# - powerpc-utils-python # this package is no longer available for RHEL8 -- - ppc64-diag -- - IBMinvscout -- - # In SAP Note 2777782, certain minimal required packages for the different RHEL 8 minor releases are listed. - # The following will assign them properly to __sap_hana_preconfigure_min_pkgs. - # If variable __sap_hana_preconfigure_min_packages_VERSION_ARCH is not defined, -@@ -127,6 +96,37 @@ __sap_hana_preconfigure_packages: - # SAP NOTE 2777782: - - tuned-profiles-sap-hana - -+# The packages for RHEL8 are almost the same as for RHEL7. -+# IBM publishes the packages as a repository here: -+# https://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/RHEL/8/ppc64le/ -+# To install the packages, you need to create an appropriate repofile -+# or clone this repository (e.g. with Satellite product) -+__sap_hana_preconfigure_required_ppc64le: -+ - librtas -+ - src -+ - rsct.core.utils -+ - rsct.core -+ - rsct.basic -+ - rsct.opt.storagerm -+ - devices.chrp.base.ServiceRM -+ - DynamicRM -+ - ncurses-libs -+ - readline -+ - sqlite -+ - sg3_utils -+ - libgcc -+ - libstdc++ -+ - zlib -+ - iprutils -+ - lsvpd -+ - libvpd -+ - libservicelog -+ - servicelog -+ - powerpc-utils -+# - powerpc-utils-python # this package is no longer available for RHEL8 -+ - ppc64-diag -+ - IBMinvscout -+ - # Network related kernel parameters as set in SAP Note 2382421: - __sap_hana_preconfigure_kernel_parameters_default: - # The following two parameter should always be set: diff --git a/sap-hana-preconfigure-#104-#105-6d65f9b667a8a7dec17caa70c5df929b921691a6.patch b/sap-hana-preconfigure-#104-#105-6d65f9b667a8a7dec17caa70c5df929b921691a6.patch deleted file mode 100644 index aba15c1..0000000 --- a/sap-hana-preconfigure-#104-#105-6d65f9b667a8a7dec17caa70c5df929b921691a6.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit 6d65f9b667a8a7dec17caa70c5df929b921691a6 -Author: Bernd Finger -Date: Thu Jul 16 11:59:24 2020 +0200 - - solve issues #104, #105 - -diff --git a/tasks/RedHat/generic/disable-coredumps.yml b/tasks/RedHat/generic/disable-coredumps.yml -index cefdb68..640a60c 100644 ---- a/tasks/RedHat/generic/disable-coredumps.yml -+++ b/tasks/RedHat/generic/disable-coredumps.yml -@@ -9,7 +9,7 @@ - domain: "*" - limit_item: core - limit_type: "{{ line_item }}" -- value: 0 -+ value: '0' - with_items: - - hard - - soft -diff --git a/tasks/sapnote/2055470.yml b/tasks/sapnote/2055470.yml -index 893420a..aa7da75 100644 ---- a/tasks/sapnote/2055470.yml -+++ b/tasks/sapnote/2055470.yml -@@ -22,7 +22,7 @@ - changed_when: sapnote_2055470_mtusize.rc == 0 - failed_when: sapnote_2055470_mtusize.rc > 0 and sapnote_2055470_mtusize.rc != 90 - with_items: "{{ sap_hana_preconfigure_ppcle_mtu9000_if }}" -- when: not( (sap_hana_preconfigure_ppcle_mtu9000_if) or ( sap_hana_preconfigure_ppcle_mtu9000_if is none) or (sap_hana_preconfigure_ppcle_mtu9000_if | trim == '') ) -+ when: not( (sap_hana_preconfigure_ppcle_mtu9000_if is undefined) or (sap_hana_preconfigure_ppcle_mtu9000_if is none) or (sap_hana_preconfigure_ppcle_mtu9000_if | trim == '') ) - loop_control: - loop_var: line_item - -@@ -33,7 +33,7 @@ - line: ETHTOOL_OPTIONS_tso='-K iface tso on' - path: /etc/sysconfig/network-scripts/ifcfg-{{ line_item }} - with_items: "{{ sap_hana_preconfigure_ppcle_tso_if }}" -- when: not( (sap_hana_preconfigure_ppcle_tso_if) or ( sap_hana_preconfigure_ppcle_tso_if is none) or (sap_hana_preconfigure_ppcle_tso_if | trim == '') ) -+ when: not( (sap_hana_preconfigure_ppcle_tso_if is undefined) or (sap_hana_preconfigure_ppcle_tso_if is none) or (sap_hana_preconfigure_ppcle_tso_if | trim == '') ) - loop_control: - loop_var: line_item - -diff --git a/tasks/sapnote/2777782/10-increase-pidmax.yml b/tasks/sapnote/2777782/10-increase-pidmax.yml -index fe210d4..40860cb 100644 ---- a/tasks/sapnote/2777782/10-increase-pidmax.yml -+++ b/tasks/sapnote/2777782/10-increase-pidmax.yml -@@ -7,7 +7,7 @@ - sysctl: - sysctl_file: /etc/sysctl.d/sap.conf - name: kernel.pid_max -- value: 4194304 -+ value: '4194304' - state: present - sysctl_set: yes - reload: yes diff --git a/sap-hana-preconfigure-#107-6f8d7c964e2c95b37c68299e6077bc3f987faffb.patch b/sap-hana-preconfigure-#107-6f8d7c964e2c95b37c68299e6077bc3f987faffb.patch deleted file mode 100644 index 027ebc9..0000000 --- a/sap-hana-preconfigure-#107-6f8d7c964e2c95b37c68299e6077bc3f987faffb.patch +++ /dev/null @@ -1,99 +0,0 @@ -commit 6f8d7c964e2c95b37c68299e6077bc3f987faffb -Author: root -Date: Tue Jul 21 18:08:57 2020 +0200 - - solve issue #107 - Regenerate grub2 conf handler cannot be found when using Ansible 2.9.10 - -diff --git a/handlers/main.yml b/handlers/main.yml -index 3f59170..543d238 100644 ---- a/handlers/main.yml -+++ b/handlers/main.yml -@@ -1,8 +1,49 @@ - --- - --- name: "Regenerate grub2 conf handler" -- import_tasks: tasks/RedHat/generic/regenerate-grub2-conf.yml -- when: sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+- name: "Check if server is booted in BIOS or UEFI mode" -+ stat: -+ path: /sys/firmware/efi -+ get_checksum: no -+ register: efi_exists -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+ -+- debug: -+ var: efi_exists.stat.exists -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+ -+- name: "Run grub-mkconfig (BIOS mode)" -+ command: grub2-mkconfig -o /boot/grub2/grub.cfg -+ register: command_result -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - not efi_exists.stat.exists -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+ -+- debug: -+ var: command_result.stdout_lines, command_result.stderr_lines -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - not efi_exists.stat.exists -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+ -+- name: "Run grub-mkconfig (UEFI mode)" -+ command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg -+ register: command_result -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - efi_exists.stat.exists -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) -+ -+- debug: -+ var: command_result.stdout_lines, command_result.stderr_lines -+ listen: "Regenerate grub2 conf handler" -+ when: -+ - efi_exists.stat.exists -+ - sap_hana_preconfigure_run_grub2_mkconfig|d(true) - - - name: "Reboot handler" - fail: -diff --git a/tasks/RedHat/generic/regenerate-grub2-conf.yml b/tasks/RedHat/generic/regenerate-grub2-conf.yml -deleted file mode 100644 -index f369a66..0000000 ---- a/tasks/RedHat/generic/regenerate-grub2-conf.yml -+++ /dev/null -@@ -1,30 +0,0 @@ ----- --# tasks file for sap-hana-preconfigure/handlers/main.yml: -- --- debug: -- msg: "Regerate grub2 config" -- --- name: "Check if server is booted in BIOS or UEFI mode" -- stat: -- path: /sys/firmware/efi -- get_checksum: no -- register: efi_exists --- debug: -- var: efi_exists.stat.exists -- --- name: "Run grub-mkconfig (BIOS mode)" -- command: grub2-mkconfig -o /boot/grub2/grub.cfg -- register: command_result -- when: -- - not efi_exists.stat.exists --- debug: -- var: command_result.stdout_lines, command_result.stderr_lines -- --- name: "Run grub-mkconfig (UEFI mode)" -- command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg -- register: command_result -- when: -- - efi_exists.stat.exists --- debug: -- var: command_result.stdout_lines, command_result.stderr_lines -- diff --git a/sap-hana-preconfigure-#109-#110-89202367321b47c3fb5d52e50f5ea220c548fab5.patch b/sap-hana-preconfigure-#109-#110-89202367321b47c3fb5d52e50f5ea220c548fab5.patch deleted file mode 100644 index 617eab8..0000000 --- a/sap-hana-preconfigure-#109-#110-89202367321b47c3fb5d52e50f5ea220c548fab5.patch +++ /dev/null @@ -1,105 +0,0 @@ -commit 89202367321b47c3fb5d52e50f5ea220c548fab5 -Author: Bernd Finger -Date: Mon Jul 27 18:51:02 2020 +0200 - - 109: Support for RHEL 7.7 - 110: Minimum kernel versions from SAP note 2812427 need to be moved to sap-preconfigure - -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 3978317..e843eb3 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -21,36 +21,60 @@ __sap_hana_preconfigure_sapnotes: - # If variable __sap_hana_preconfigure_min_packages_VERSION is not defined, - # variable __sap_hana_preconfigure_min_pkgs will be undefined as well. - --__sap_hana_preconfigure_min_packages_7_2: -+__sap_hana_preconfigure_min_packages_7_2_x86_64: - - [ 'kernel' , '3.10.0-327.62.4.el7' ] - - [ 'systemd' , '219-19.el7_2.4' ] - --__sap_hana_preconfigure_min_packages_7_3: -+__sap_hana_preconfigure_min_packages_7_2_ppc64le: -+ - [ 'kernel' , '3.10.0-327.62.4.el7' ] -+ - [ 'systemd' , '219-19.el7_2.4' ] -+ -+__sap_hana_preconfigure_min_packages_7_3_x86_64: -+ - [ 'kernel' , '3.10.0-514.36.5.el7' ] -+ - [ 'glibc' , '2.17-157.el7_3.5' ] -+ - [ 'tuned-profiles-sap-hana' , '2.7.1-3.el7_3.3' ] -+ -+__sap_hana_preconfigure_min_packages_7_3_ppc64le: - - [ 'kernel' , '3.10.0-514.36.5.el7' ] - - [ 'glibc' , '2.17-157.el7_3.5' ] - - [ 'tuned-profiles-sap-hana' , '2.7.1-3.el7_3.3' ] - --__sap_hana_preconfigure_min_packages_7_4: -+# Attention: SAP note 2812427 requires more recent package kernel-3.10.0-693.58.1, covered by role sap-preconfigure -+__sap_hana_preconfigure_min_packages_7_4_x86_64: -+ - [ 'kernel' , '3.10.0-693.11.6.el7' ] -+ - [ 'tuned-profiles-sap-hana' , '2.8.0-5.el7_4.2' ] -+ -+__sap_hana_preconfigure_min_packages_7_4_ppc64le: - - [ 'kernel' , '3.10.0-693.11.6.el7' ] - - [ 'tuned-profiles-sap-hana' , '2.8.0-5.el7_4.2' ] - --# SAP note 2812427: --__sap_hana_preconfigure_min_packages_7_5: -- - [ 'kernel' , '3.10.0-862.41.1.el7' ] -+__sap_hana_preconfigure_min_packages_7_5_x86_64: -+ -+__sap_hana_preconfigure_min_packages_7_5_ppc64le: -+ -+# Attention: SAP note 2812427 requires more recent package kernel-3.10.0-957.35.1, covered by role sap-preconfigure -+__sap_hana_preconfigure_min_packages_7_6_x86_64: -+ - [ 'kernel' , '3.10.0-957.1.3.el7' ] -+ -+__sap_hana_preconfigure_min_packages_7_6_ppc64le: -+ - [ 'kernel' , '3.10.0-957.1.3.el7' ] -+ -+# SAP note 2292690: -+__sap_hana_preconfigure_min_packages_7_7_x86_64: -+ - [ 'kernel' , '3.10.0-1062.21.1.el7' ] -+ -+__sap_hana_preconfigure_min_packages_7_7_ppc64le: -+ - [ 'kernel' , '3.10.0-1062.26.1.el7' ] - --# SAP note 2812427: --__sap_hana_preconfigure_min_packages_7_6: -- - [ 'kernel' , '3.10.0-957.27.4.el7' ] -+__sap_hana_preconfigure_min_packages_7_8_x86_64: - --# SAP note 2812427: --__sap_hana_preconfigure_min_packages_7_7: -- - [ 'kernel' , '3.10.0-1062.1.1.el7' ] -+__sap_hana_preconfigure_min_packages_7_8_ppc64le: - --__sap_hana_preconfigure_min_packages_7_8: -+__sap_hana_preconfigure_min_packages_7_9_x86_64: - --__sap_hana_preconfigure_min_packages_7_9: -+__sap_hana_preconfigure_min_packages_7_9_ppc64le: - --__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") ) }}" -+__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture|string) }}" - - __sap_hana_preconfigure_packages: - # SAP note 2009879: -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 94d862b..0f6cdf8 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -25,11 +25,13 @@ __sap_hana_preconfigure_sapnotes: - # variable __sap_hana_preconfigure_min_pkgs will be undefined as well. - - # Minimum required package levels for RHEL 8.0: -+# Attention: SAP note 2812427 requires more recent package kernel-4.18.0-80.15.1.el8_0 also for x86_64, covered by role sap-preconfigure - __sap_hana_preconfigure_min_packages_8_0_x86_64: - - __sap_hana_preconfigure_min_packages_8_0_ppc64le: - - [ 'kernel' , '4.18.0-80.15.1.el8_0' ] - -+# Minimum required package levels for RHEL 8.1: - __sap_hana_preconfigure_min_packages_8_1_x86_64: - - [ 'kernel' , '4.18.0-147.5.1.el8_1' ] - diff --git a/sap-hana-preconfigure-#111-part1-03affb58325bf1c370ea3e0d76e291eb9485acf1.patch b/sap-hana-preconfigure-#111-part1-03affb58325bf1c370ea3e0d76e291eb9485acf1.patch deleted file mode 100644 index bd12c71..0000000 --- a/sap-hana-preconfigure-#111-part1-03affb58325bf1c370ea3e0d76e291eb9485acf1.patch +++ /dev/null @@ -1,116 +0,0 @@ -commit 03affb58325bf1c370ea3e0d76e291eb9485acf1 -Author: Bernd Finger -Date: Mon Jul 27 20:10:03 2020 +0200 - - 111 - Add support for IBM service and productivity tools for Power - -diff --git a/README.md b/README.md -index efb60f1..37ecdbe 100644 ---- a/README.md -+++ b/README.md -@@ -114,6 +114,13 @@ If you want the role to set the RHEL release to a certain fixed minor release (a - sap_hana_preconfigure_set_minor_release - ``` - -+### URL for IBM service and productivity tools for POWER (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 -+sap_hana_preconfigure_ibm_power_repo_url -+``` -+ - ### How to behave if reboot is required - The following variable will ensure that the role will fail if a reboot is required, if undefined or set to `yes`, which is also the default. Rebooting the managed node can be done in the playbook which is calling this role. By setting the variable to `no`, the role will not fail if a reboot is required. - ```yaml -diff --git a/defaults/main.yml b/defaults/main.yml -index 4929e66..c008330 100644 ---- a/defaults/main.yml -+++ b/defaults/main.yml -@@ -73,6 +73,9 @@ sap_hana_preconfigure_update: no - - sap_hana_preconfigure_kernel_parameters: "{{ __sap_hana_preconfigure_kernel_parameters_default }}" - -+# sap_hana_preconfigure_ibm_power_repo_url: "{{ __sap_hana_preconfigure_ibm_power_repo_url }}" -+sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-3.0.0-19.noarch.rpm' -+ - #### The following parameters are for PPC LE only - ## add a list of interfaces where MTU size will be set to 9000 - ## defaults to empty -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 502e94f..ec6e546 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -59,28 +59,37 @@ - - ### If this task fails, you need to enable the IBM PowerTools repository - ### see https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html for details --## --### # yum -y install http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm --### # /opt/ibm/lop/configure --### # yum -y install ibm-power-managed-rhel7 --### --- name: Install IBM Tools -+ -+- name: Install the ibm-power-repo package -+ yum: -+ name: "{{ sap_hana_preconfigure_ibm_power_repo_url }}" -+ state: present -+ when: ansible_architecture == "ppc64le" -+ -+- name: Accept the license for the IBM tools -+ shell: | -+ MORE=+1000 /opt/ibm/lop/configure <<-EOF -+ y -+ EOF -+ when: ansible_architecture == "ppc64le" -+ -+- name: Install IBM tools - package: - state: latest - name: "{{ __sap_hana_preconfigure_required_ppc64le }}" -- when: ansible_architecture == "ppc64le" -+ when: ansible_architecture == "ppc64le" - --- name: Get status of installed IBM Tools -+- name: Get status of installed IBM tools - yum: - name: "{{ __sap_hana_preconfigure_required_ppc64le }}" - register: ibm_result - ignore_errors: True - changed_when: false -- when: ansible_architecture == "ppc64le" -+ when: ansible_architecture == "ppc64le" - - - debug: - var: ibm_result.results -- when: ansible_architecture == "ppc64le" -+ when: ansible_architecture == "ppc64le" - - - name: Ensure minimum packages are installed - block: -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index e843eb3..632e469 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -120,6 +120,8 @@ __sap_hana_preconfigure_packages: - # libtool-ltdl: See https://answers.sap.com/questions/476177/hana-db-installation-ended-with-exit-code-127.html - # This is required since HANA 2 SPS 03, and so we always install it. - -+__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-lastest.noarch.rpm' -+ - # As per https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html : - __sap_hana_preconfigure_required_ppc64le: - - librtas -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 0f6cdf8..8fbfa89 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -103,6 +103,8 @@ __sap_hana_preconfigure_packages: - # https://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/RHEL/8/ppc64le/ - # To install the packages, you need to create an appropriate repofile - # or clone this repository (e.g. with Satellite product) -+__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-lastest.noarch.rpm' -+ - __sap_hana_preconfigure_required_ppc64le: - - librtas - - src diff --git a/sap-hana-preconfigure-#111-part2-6edb1339a1a79c9e47f8023534e0a3db429dbf20.patch b/sap-hana-preconfigure-#111-part2-6edb1339a1a79c9e47f8023534e0a3db429dbf20.patch deleted file mode 100644 index 2df6611..0000000 --- a/sap-hana-preconfigure-#111-part2-6edb1339a1a79c9e47f8023534e0a3db429dbf20.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 6edb1339a1a79c9e47f8023534e0a3db429dbf20 -Author: Bernd Finger -Date: Tue Jul 28 14:37:08 2020 +0200 - - typo in repo name for IBM Power tools - -diff --git a/defaults/main.yml b/defaults/main.yml -index c008330..8d0d1d7 100644 ---- a/defaults/main.yml -+++ b/defaults/main.yml -@@ -73,8 +73,8 @@ sap_hana_preconfigure_update: no - - sap_hana_preconfigure_kernel_parameters: "{{ __sap_hana_preconfigure_kernel_parameters_default }}" - --# sap_hana_preconfigure_ibm_power_repo_url: "{{ __sap_hana_preconfigure_ibm_power_repo_url }}" --sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-3.0.0-19.noarch.rpm' -+# sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-3.0.0-19.noarch.rpm' -+sap_hana_preconfigure_ibm_power_repo_url: "{{ __sap_hana_preconfigure_ibm_power_repo_url }}" - - #### The following parameters are for PPC LE only - ## add a list of interfaces where MTU size will be set to 9000 -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 632e469..dd5d2dc 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -120,7 +120,7 @@ __sap_hana_preconfigure_packages: - # libtool-ltdl: See https://answers.sap.com/questions/476177/hana-db-installation-ended-with-exit-code-127.html - # This is required since HANA 2 SPS 03, and so we always install it. - --__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-lastest.noarch.rpm' -+__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm' - - # As per https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html : - __sap_hana_preconfigure_required_ppc64le: -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 8fbfa89..7697ac1 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -103,7 +103,7 @@ __sap_hana_preconfigure_packages: - # https://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/RHEL/8/ppc64le/ - # To install the packages, you need to create an appropriate repofile - # or clone this repository (e.g. with Satellite product) --__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-lastest.noarch.rpm' -+__sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm' - - __sap_hana_preconfigure_required_ppc64le: - - librtas diff --git a/sap-hana-preconfigure-#112-part1-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch b/sap-hana-preconfigure-#112-part1-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch deleted file mode 100644 index e387f3c..0000000 --- a/sap-hana-preconfigure-#112-part1-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit d26152ada59c5e2919be3f7cf89927ac7bfd510d -Author: Bernd Finger -Date: Thu Jul 30 19:12:22 2020 +0200 - - issue 112: include module is/will be deprecated and is causing ansible-lint to fail - -diff --git a/tasks/RedHat/configuration.yml b/tasks/RedHat/configuration.yml -index f0bcbd4..04bb486 100644 ---- a/tasks/RedHat/configuration.yml -+++ b/tasks/RedHat/configuration.yml -@@ -17,6 +17,6 @@ - include_tasks: "sapnote/{{ item }}.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" - --- include: "{{ './' + ansible_distribution + '_' + ansible_distribution_major_version + '/recommendations.yml' }}" -+- include_tasks: "{{ './' + ansible_distribution + '_' + ansible_distribution_major_version + '/recommendations.yml' }}" - - ... -diff --git a/tasks/SLES/configuration.yml b/tasks/SLES/configuration.yml -index a7c49e6..b0b4503 100644 ---- a/tasks/SLES/configuration.yml -+++ b/tasks/SLES/configuration.yml -@@ -12,6 +12,6 @@ - include_tasks: "sapnotes/{{ item }}/configuration.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" - --- include: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" -+- include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" - - ... diff --git a/sap-hana-preconfigure-#112-part2-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch b/sap-hana-preconfigure-#112-part2-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch deleted file mode 100644 index 1424d0e..0000000 --- a/sap-hana-preconfigure-#112-part2-d26152ada59c5e2919be3f7cf89927ac7bfd510d.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 896c956aab61a0ab94ca1e36c9d8693b4b6c2a5a -Author: Bernd Finger -Date: Thu Jul 30 19:15:21 2020 +0200 - - The note about manually configuring access to the IBM power tools can be removed. - -diff --git a/README.md b/README.md -index 37ecdbe..eeb71dc 100644 ---- a/README.md -+++ b/README.md -@@ -58,8 +58,6 @@ Note - ---- - For finding out which SAP notes will be used by this role, please check the contents of variable `__sap_hana_preconfigure_sapnotes` in files `vars/*.yml` (choose the file which matches your OS distribution and version). - --Before running this role on a RHEL on ppc64le system, make sure that you have access to the required IBM repos/packages as mentioned in the comments to variable `__sap_hana_preconfigure_required_ppc64le`, see files `vars/*.yml`. -- - Do not run this role against an SAP HANA or other production system. The role will enforce a certain configuration on the managed node(s), which might not be intended. - - Role Variables diff --git a/sap-hana-preconfigure-#113-1442c5470eae0769a6ceee201621aab0518bb6f3.patch b/sap-hana-preconfigure-#113-1442c5470eae0769a6ceee201621aab0518bb6f3.patch deleted file mode 100644 index a07e74d..0000000 --- a/sap-hana-preconfigure-#113-1442c5470eae0769a6ceee201621aab0518bb6f3.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 1442c5470eae0769a6ceee201621aab0518bb6f3 -Author: Bernd Finger -Date: Sat Aug 1 01:12:16 2020 +0200 - - 113: ansible-line failing - -diff --git a/tasks/sapnote/2013638.yml b/tasks/sapnote/2013638.yml -index 5e23009..53340c6 100644 ---- a/tasks/sapnote/2013638.yml -+++ b/tasks/sapnote/2013638.yml -@@ -1,8 +1,7 @@ - --- - # OS RELEASE: RHEL 6.5 -- -- --fail: -- msg: "RHEL 6.5 is out of maintenance\nPlease upgrade to RHEL 6.7 at least" -+# -+- fail: -+ msg: "RHEL 6.5 is out of maintenance.\nPlease upgrade to RHEL 6.7 at least" - - ... -diff --git a/tasks/sapnote/2136965.yml b/tasks/sapnote/2136965.yml -index a0e3f89..8041f2b 100644 ---- a/tasks/sapnote/2136965.yml -+++ b/tasks/sapnote/2136965.yml -@@ -4,7 +4,7 @@ - # https://launchpad.support.sap.com/#/notes/2136965 - - --fail: -- msg: "RHEL 6.6 is out of maintenance\nPlease upgrade to RHEL 6.7 at least" -+- fail: -+ msg: "RHEL 6.6 is out of maintenance\nPlease upgrade to RHEL 6.7 at least" - - ... -diff --git a/tasks/sapnote/2247020.yml b/tasks/sapnote/2247020.yml -index 445de24..81d9c60 100644 ---- a/tasks/sapnote/2247020.yml -+++ b/tasks/sapnote/2247020.yml -@@ -1,7 +1,7 @@ - --- - # OS RELEASE: RHEL 6.7 - --fail: -- msg: "RHEL 6.7 is not implemented yet" -+- fail: -+ msg: "RHEL 6.7 is not implemented yet" - - ... diff --git a/sap-hana-preconfigure-#114-f011979fa05e938165c95a134bbdcc37a33f4eea.patch b/sap-hana-preconfigure-#114-f011979fa05e938165c95a134bbdcc37a33f4eea.patch deleted file mode 100644 index 239077b..0000000 --- a/sap-hana-preconfigure-#114-f011979fa05e938165c95a134bbdcc37a33f4eea.patch +++ /dev/null @@ -1,370 +0,0 @@ -commit f011979fa05e938165c95a134bbdcc37a33f4eea -Author: Bernd Finger -Date: Sat Aug 1 01:28:00 2020 +0200 - - 114: remove all trailing whitespaces - -diff --git a/handlers/main.yml b/handlers/main.yml -index 543d238..b3dbdec 100644 ---- a/handlers/main.yml -+++ b/handlers/main.yml -@@ -19,7 +19,7 @@ - command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: command_result - listen: "Regenerate grub2 conf handler" -- when: -+ when: - - not efi_exists.stat.exists - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) - -diff --git a/tasks/RedHat/configuration.yml b/tasks/RedHat/configuration.yml -index 04bb486..0d77b5d 100644 ---- a/tasks/RedHat/configuration.yml -+++ b/tasks/RedHat/configuration.yml -@@ -5,7 +5,7 @@ - # verbosity: "{{ debuglevel }}" - # - - name: list of required SAP Notes -- debug: -+ debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) - - # We want to disable firewalld, so we need to check if firewalld is installed -@@ -13,10 +13,10 @@ - package_facts: - manager: auto - --- name: include configuration actions for required sapnotes -+- name: include configuration actions for required sapnotes - include_tasks: "sapnote/{{ item }}.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" -- -+ - - include_tasks: "{{ './' + ansible_distribution + '_' + ansible_distribution_major_version + '/recommendations.yml' }}" - - ... -diff --git a/tasks/RedHat/generic/configure-tuned.yml b/tasks/RedHat/generic/configure-tuned.yml -index ce66b31..50b8752 100644 ---- a/tasks/RedHat/generic/configure-tuned.yml -+++ b/tasks/RedHat/generic/configure-tuned.yml -@@ -22,7 +22,7 @@ - block: - - name: Switch to tuned profile sap-hana if not currently active - command: /usr/sbin/tuned-adm profile sap-hana -- -+ - - name: Show active tuned profile - command: bash -lc "/usr/sbin/tuned-adm active | grep ":" | cut -d ":" -f 2 | awk '{$1=$1;print}'" - register: new_profile -@@ -67,7 +67,7 @@ - block: - - name: Switch to tuned profiles sap-hana sap-hana-ppc64le if not currently active - command: /usr/sbin/tuned-adm profile sap-hana sap-hana-ppc64le -- -+ - - name: Show active tuned profile - command: bash -lc "/usr/sbin/tuned-adm active | grep ":" | cut -d ":" -f 2 | awk '{$1=$1;print}'" - register: new_profile_ppc64le -diff --git a/tasks/RedHat/generic/disable-coredumps.yml b/tasks/RedHat/generic/disable-coredumps.yml -index 640a60c..a40a4c5 100644 ---- a/tasks/RedHat/generic/disable-coredumps.yml -+++ b/tasks/RedHat/generic/disable-coredumps.yml -@@ -4,11 +4,11 @@ - msg: "imported RedHat/generic/disable-coredumps.yml" - - - name: disable core file creation for all users -- pam_limits: -+ pam_limits: - dest: /etc/security/limits.d/99-sap.conf -- domain: "*" -- limit_item: core -- limit_type: "{{ line_item }}" -+ domain: "*" -+ limit_item: core -+ limit_type: "{{ line_item }}" - value: '0' - with_items: - - hard -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index ec6e546..9bd3dfa 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -21,7 +21,7 @@ - state: present - - when: sap_hana_preconfigure_enable_sap_hana_repos -- -+ - - name: Detect if the minor RHEL release is set - shell: subscription-manager release --show | awk '{print $NF}' - register: subscription_manager_release_result -@@ -131,7 +131,7 @@ - when: sap_hana_preconfigure_fact_minpkglist | d([]) - # when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) - -- when: -+ when: - - sap_hana_preconfigure_min_package_check|bool - - __sap_hana_preconfigure_min_pkgs | d([]) - # - not( (__sap_hana_preconfigure_min_pkgs is undefined) or (__sap_hana_preconfigure_min_pkgs is none) or (__sap_hana_preconfigure_min_pkgs | trim == '') ) -diff --git a/tasks/RedHat_7/recommendations.yml b/tasks/RedHat_7/recommendations.yml -index 80a8eb0..fefa213 100644 ---- a/tasks/RedHat_7/recommendations.yml -+++ b/tasks/RedHat_7/recommendations.yml -@@ -3,11 +3,11 @@ - ## This creates the SAP Users in case you define them in your playbook - ## This has been done for providers who want to create the SAP users before handing - ## over the image to clients --- name: ensure sapadm group and sapadm user is created -+- name: ensure sapadm group and sapadm user is created - block: -- - name: ensure sapdm user exists -- group: -- name: sapsys -+ - name: ensure sapdm user exists -+ group: -+ name: sapsys - gid: "{{ sap_sapsys_gid }}" - - name: ensure sapadm user exists - user: -@@ -19,7 +19,7 @@ - - sap_sapsys_gid is defined - - sap_sapadm_uid is defined - - sap_sapadm_pw_clear is defined -- -+ - ### Disable tempfile handling, otherwise things are gone after reboot - # already in sap-preconfigure, sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml - # - name: disable temp file handling for SAP applications -diff --git a/tasks/RedHat_8/recommendations.yml b/tasks/RedHat_8/recommendations.yml -index f3ba349..382eda1 100644 ---- a/tasks/RedHat_8/recommendations.yml -+++ b/tasks/RedHat_8/recommendations.yml -@@ -3,11 +3,11 @@ - ## Most of this is described in SAP Note 2009879 - - ## TODO: Next task should be moved to sap-deploy, or sap-hostagent install ! --- name: ensure sapsys group and sapadm user are created -+- name: ensure sapsys group and sapadm user are created - block: -- - name: ensure sapsys group exists -- group: -- name: sapsys -+ - name: ensure sapsys group exists -+ group: -+ name: sapsys - gid: "{{ sap_sapsys_gid }}" - - name: ensure sapadm user exists - user: -@@ -20,7 +20,6 @@ - - sap_sapsys_gid is defined - - sap_sapadm_uid is defined - - sap_sapadm_pw_clear is defined -- - - ### Firewall Settings can only be done if SAP instance ID is known, - ### otherwise disable firewall -diff --git a/tasks/SLES/configuration.yml b/tasks/SLES/configuration.yml -index b0b4503..f665c73 100644 ---- a/tasks/SLES/configuration.yml -+++ b/tasks/SLES/configuration.yml -@@ -5,13 +5,13 @@ - # verbosity: "{{ debuglevel }}" - # - - name: list of required SAP Notes -- debug: -+ debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) - --- name: include configuration actions for required sapnotes -+- name: include configuration actions for required sapnotes - include_tasks: "sapnotes/{{ item }}/configuration.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" -- -+ - - include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" - - ... -diff --git a/tasks/SLES/installation.yml b/tasks/SLES/installation.yml -index d9b3472..fab2b34 100644 ---- a/tasks/SLES/installation.yml -+++ b/tasks/SLES/installation.yml -@@ -5,11 +5,11 @@ - # verbosity: "{{ debuglevel }}" - # - - name: list of required SAP Notes -- debug: -+ debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) - --- name: include configuration actions for required sapnotes -+- name: include configuration actions for required sapnotes - include_tasks: "tasks/sapnote/{{ item }}/installation.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" -- -+ - ... -diff --git a/tasks/SLES15/recommendations.yml b/tasks/SLES15/recommendations.yml -index 71fcd3b..821bb46 100644 ---- a/tasks/SLES15/recommendations.yml -+++ b/tasks/SLES15/recommendations.yml -@@ -1,12 +1,11 @@ - --- - -- - ## TODO: Next task should be moved to sap-deploy, or sap-hostagent install ! --- name: ensure sapadm group and sapadm user is created -+- name: ensure sapadm group and sapadm user is created - block: -- - name: ensure sapadm user exists -- group: -- name: sapsys -+ - name: ensure sapadm user exists -+ group: -+ name: sapsys - gid: "{{ sap_sapsys_gid }}" - - name: ensure sapadm user exists - user: -@@ -18,6 +17,5 @@ - - sap_sapsys_gid is defined - - sap_sapadm_uid is defined - - sap_sapadm_pw_clear is defined -- - - ... -diff --git a/tasks/sapnote/1275776/configuration.yml b/tasks/sapnote/1275776/configuration.yml -index 88e55f7..15d869c 100644 ---- a/tasks/sapnote/1275776/configuration.yml -+++ b/tasks/sapnote/1275776/configuration.yml -@@ -14,7 +14,7 @@ - - - name: "1275776 - Configuration saptune sap note 1275776" - command: "saptune note apply 1275776" -- -+ - - name: "1275776 - Configuration saptune sap note 1984787" - command: "saptune note apply 1984787" - -diff --git a/tasks/sapnote/1944799/installation.yml b/tasks/sapnote/1944799/installation.yml -index 385d727..9260ede 100644 ---- a/tasks/sapnote/1944799/installation.yml -+++ b/tasks/sapnote/1944799/installation.yml -@@ -25,10 +25,9 @@ - - name: "1944799 - PDF 8.1 Package List Packages" - zypper: - name: "{{ packages }}" -- type: package -+ type: package - vars: - packages: - - libssh2-1 - - libopenssl1_0_0 - ... -- -diff --git a/tasks/sapnote/2009879_7.yml b/tasks/sapnote/2009879_7.yml -index c86b364..89dc1a5 100644 ---- a/tasks/sapnote/2009879_7.yml -+++ b/tasks/sapnote/2009879_7.yml -@@ -25,7 +25,7 @@ - with_items: - - { src: 'libssl.so.1.0.1e', dest: 'libssl.so.1.0.1' } - - { src: 'libcrypto.so.1.0.1e', dest: 'libcrypto.so.1.0.1' } -- when: -+ when: - ( ansible_distribution_version == '7.2' ) - loop_control: - loop_var: line_item -@@ -35,7 +35,7 @@ - with_items: - - { src: 'libssl.so.10', dest: 'libssl.so.1.0.1' } - - { src: 'libcrypto.so.10', dest: 'libcrypto.so.1.0.1' } -- when: -+ when: - ( ansible_distribution_version != '7.2' ) - loop_control: - loop_var: line_item -diff --git a/tasks/sapnote/2055470.yml b/tasks/sapnote/2055470.yml -index aa7da75..b958e52 100644 ---- a/tasks/sapnote/2055470.yml -+++ b/tasks/sapnote/2055470.yml -@@ -36,7 +36,7 @@ - when: not( (sap_hana_preconfigure_ppcle_tso_if is undefined) or (sap_hana_preconfigure_ppcle_tso_if is none) or (sap_hana_preconfigure_ppcle_tso_if | trim == '') ) - loop_control: - loop_var: line_item -- -+ - - name: add largesend parameter - sysctl: - sysctl_file: /etc/sysctl.d/ibm_largesend.conf -diff --git a/tasks/sapnote/2382421.yml b/tasks/sapnote/2382421.yml -index 794e728..3847edc 100644 ---- a/tasks/sapnote/2382421.yml -+++ b/tasks/sapnote/2382421.yml -@@ -3,10 +3,10 @@ - # SAP Note: 2382421 - Optimizing the Network Configuration on HANA- and OS-Level - # - - name: setting kernel tunables as in SAP NOTE 2382421 -- sysctl: -+ sysctl: - sysctl_file: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}" - name: "{{ line_item.name }}" -- value: "{{ line_item.value }}" -+ value: "{{ line_item.value }}" - state: present - sysctl_set: yes - reload: yes -diff --git a/tasks/sapnote/2578899/configuration.yml b/tasks/sapnote/2578899/configuration.yml -index e554a2d..9f221cb 100644 ---- a/tasks/sapnote/2578899/configuration.yml -+++ b/tasks/sapnote/2578899/configuration.yml -@@ -1,6 +1,6 @@ - --- - --- name: 2588899 - I/O scheduler -+- name: 2588899 - I/O scheduler - lineinfile: - path: /etc/default/grub - backup: yes -diff --git a/tasks/sapnote/2578899/installation.yml b/tasks/sapnote/2578899/installation.yml -index 28d798e..0c41def 100644 ---- a/tasks/sapnote/2578899/installation.yml -+++ b/tasks/sapnote/2578899/installation.yml -@@ -10,7 +10,7 @@ - - libopenssl1_0_0 - - --- name: 2578899 - sysstat - monitoring data -+- name: 2578899 - sysstat - monitoring data - package: - name: "sysstat" - -diff --git a/tasks/sapnote/2684254/configuration.yml b/tasks/sapnote/2684254/configuration.yml -index 53fd4d9..f7b9411 100644 ---- a/tasks/sapnote/2684254/configuration.yml -+++ b/tasks/sapnote/2684254/configuration.yml -@@ -1,10 +1,10 @@ - --- --- name: 2684254 - Increase UserTasksMax -+- name: 2684254 - Increase UserTasksMax - copy: - dest: "/etc/systemd/logind.conf.d/sap.conf" - content: | - [Login] -- UserTasksMax=infinity -+ UserTasksMax=infinity - #- name: Turn off auto-numa balancing - # sysctl: - # sysctl_file: /etc/sysctl.d/sap_hana.conf -diff --git a/tasks/sapnote/2684254/installation.yml b/tasks/sapnote/2684254/installation.yml -index f24fb54..d669d01 100644 ---- a/tasks/sapnote/2684254/installation.yml -+++ b/tasks/sapnote/2684254/installation.yml -@@ -8,7 +8,7 @@ - package: - name: "{{ packages }}" - vars: -- packages: -+ packages: - - libopenssl1_0_0 - - libssh2-1 - diff --git a/sap-hana-preconfigure-#116-752f988bf105a325db12965d240bbe1462b72c78.patch b/sap-hana-preconfigure-#116-752f988bf105a325db12965d240bbe1462b72c78.patch deleted file mode 100644 index 0401b99..0000000 --- a/sap-hana-preconfigure-#116-752f988bf105a325db12965d240bbe1462b72c78.patch +++ /dev/null @@ -1,61 +0,0 @@ -commit 752f988bf105a325db12965d240bbe1462b72c78 -Author: Bernd Finger -Date: Tue Aug 4 17:12:44 2020 +0200 - - issue 116: add an option for not adding the repo for IBM service and productivity tools for POWER - -diff --git a/README.md b/README.md -index eeb71dc..e921f16 100644 ---- a/README.md -+++ b/README.md -@@ -112,6 +112,12 @@ If you want the role to set the RHEL release to a certain fixed minor release (a - sap_hana_preconfigure_set_minor_release - ``` - -+### Add the repository for IBM service and productivity tools for POWER (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) - 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. -diff --git a/defaults/main.yml b/defaults/main.yml -index 8d0d1d7..7a5d862 100644 ---- a/defaults/main.yml -+++ b/defaults/main.yml -@@ -73,6 +73,8 @@ sap_hana_preconfigure_update: no - - sap_hana_preconfigure_kernel_parameters: "{{ __sap_hana_preconfigure_kernel_parameters_default }}" - -+sap_hana_preconfigure_add_ibm_power_repo: yes -+ - # sap_hana_preconfigure_ibm_power_repo_url: 'http://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-3.0.0-19.noarch.rpm' - sap_hana_preconfigure_ibm_power_repo_url: "{{ __sap_hana_preconfigure_ibm_power_repo_url }}" - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 9bd3dfa..7796420 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -64,14 +64,18 @@ - yum: - name: "{{ sap_hana_preconfigure_ibm_power_repo_url }}" - state: present -- when: ansible_architecture == "ppc64le" -+ when: -+ - ansible_architecture == "ppc64le" -+ - sap_hana_preconfigure_add_ibm_power_repo|d(true) - - - name: Accept the license for the IBM tools - shell: | - MORE=+1000 /opt/ibm/lop/configure <<-EOF - y - EOF -- when: ansible_architecture == "ppc64le" -+ when: -+ - ansible_architecture == "ppc64le" -+ - sap_hana_preconfigure_add_ibm_power_repo|d(true) - - - name: Install IBM tools - package: diff --git a/sap-hana-preconfigure-#119-75a1940d0230c0fb2957426952c5308e08919c06.patch b/sap-hana-preconfigure-#119-75a1940d0230c0fb2957426952c5308e08919c06.patch deleted file mode 100644 index 3528ead..0000000 --- a/sap-hana-preconfigure-#119-75a1940d0230c0fb2957426952c5308e08919c06.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit 75a1940d0230c0fb2957426952c5308e08919c06 -Author: Bernd Finger -Date: Mon Sep 21 10:32:34 2020 +0200 - - solve issue #119 - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 7796420..491c8ab 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -64,6 +64,7 @@ - yum: - name: "{{ sap_hana_preconfigure_ibm_power_repo_url }}" - state: present -+ disable_gpg_check: True - when: - - ansible_architecture == "ppc64le" - - sap_hana_preconfigure_add_ibm_power_repo|d(true) diff --git a/sap-hana-preconfigure-#94-#97-ecb7c33e9a8eddb633189d332683309d398fd54f.patch b/sap-hana-preconfigure-#94-#97-ecb7c33e9a8eddb633189d332683309d398fd54f.patch deleted file mode 100644 index 8ce4131..0000000 --- a/sap-hana-preconfigure-#94-#97-ecb7c33e9a8eddb633189d332683309d398fd54f.patch +++ /dev/null @@ -1,234 +0,0 @@ -commit ecb7c33e9a8eddb633189d332683309d398fd54f -Author: Bernd Finger -Date: Fri Jun 19 19:27:48 2020 +0200 - - - replaced yum package update by Jinja2 - - added minimum required kernel versions for RHEL 8 - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 7995d99..9ba248c 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -71,44 +71,71 @@ - - - name: Ensure minimum packages are installed - block: -- - name: check if minimum release needs to be installed -- shell: | -- set -x -- required_pkg={{ pkg | join('-') }} --# newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sort -V | tail -1) -- newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| awk '{gsub ("\\.el", ".0.0."); print}' | sort -V | tail -1) --# if [ $newest == $required_pkg ]; then -- if [ $newest == ${required_pkg/.el/.0.0.} ]; then -- echo $newest -- fi -- loop: "{{ sap_hana_preconfigure_min_pkgs }}" -- loop_control: -- loop_var: pkg -- check_mode: no -- register: sap_hana_preconfigure_register_minpkglist -- changed_when: false -- -- - name: Initialize an empty list for our strings -- set_fact: -- sap_hana_preconfigure_fact_minpkglist: [] -- -- - name: Create list of packages to be installed -- set_fact: -- sap_hana_preconfigure_fact_minpkglist: "{{ sap_hana_preconfigure_fact_minpkglist | difference(['']) + [ pkg.stdout ] }}" -- loop: "{{ sap_hana_preconfigure_register_minpkglist.results }}" -- loop_control: -- loop_var: pkg -- - debug: var=sap_hana_preconfigure_fact_minpkglist -- -- - name: Install minimum packages if required -- yum: -- name: "{{ sap_hana_preconfigure_fact_minpkglist }}" -- state: present -- when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) -+ - name: Gather package facts -+ package_facts: -+ -+ - set_fact: -+ reqpkgs: "{{ __sap_hana_preconfigure_min_pkgs }}" -+ -+ - debug: -+ var: reqpkgs -+ -+ - set_fact: -+ sap_hana_preconfigure_fact_minpkglist: |- -+ {% set ns = namespace() %} -+ {% set ns.pkgs = [] %} -+ {% for reqpkg in reqpkgs %} -+ {% if not reqpkg[0] in ansible_facts.packages %} -+ {% set _ = ns.pkgs.append(reqpkg | join('-')) %} -+ {% else %} -+ {% set pkg = ansible_facts.packages[reqpkg[0]][-1] %} -+ {% set verrel = pkg.version ~ '-' ~ pkg.release %} -+ {% if reqpkg[1].replace (".el", ".0.0.") is version(verrel.replace (".el", ".0.0."), '>', strict=false) %} -+ {% set _ = ns.pkgs.append(reqpkg | join('-')) %} -+ {% else %} -+ {% set _ = "pkg already installed with same or later version" %} -+ {% endif %} -+ {% endif %} -+ {% endfor %} -+ {{ ns.pkgs }} -+ -+# - name: check if minimum release needs to be installed -+# shell: | -+# set -x -+# required_pkg={{ pkg | join('-') }} -+# newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sed "s,\.el,.0.0.," | sort -V | tail -1) -+# if [ $newest == ${required_pkg/.el/.0.0.} ]; then -+# echo $newest -+# fi -+# loop: "{{ __sap_hana_preconfigure_min_pkgs }}" -+# loop_control: -+# loop_var: pkg -+# check_mode: no -+# register: sap_hana_preconfigure_register_minpkglist -+# changed_when: false -+ -+# - name: Initialize an empty list for our strings -+# set_fact: -+# sap_hana_preconfigure_fact_minpkglist: [] -+ -+# - name: Create list of packages to be installed -+# set_fact: -+# sap_hana_preconfigure_fact_minpkglist: "{{ sap_hana_preconfigure_fact_minpkglist | difference(['']) + [ pkg.stdout ] }}" -+# loop: "{{ sap_hana_preconfigure_register_minpkglist.results }}" -+# loop_control: -+# loop_var: pkg -+ -+ - debug: var=sap_hana_preconfigure_fact_minpkglist -+ -+ - name: Install minimum packages if required -+ yum: -+ name: "{{ sap_hana_preconfigure_fact_minpkglist }}" -+ state: present -+ when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) - - when: - - sap_hana_preconfigure_min_package_check|bool -- - not( (sap_hana_preconfigure_min_pkgs is undefined) or (sap_hana_preconfigure_min_pkgs is none) or (sap_hana_preconfigure_min_pkgs | trim == '') ) -+ - not( (__sap_hana_preconfigure_min_pkgs is undefined) or (__sap_hana_preconfigure_min_pkgs is none) or (__sap_hana_preconfigure_min_pkgs | trim == '') ) - - - set_fact: - needs_restarting_command: "needs-restarting -r" -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 30c6d38..8ac6939 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -44,40 +44,40 @@ __sap_hana_preconfigure_required_ppc64le: - - IBMinvscout - - # In SAP Note 2235581, certain minimal required packages for the different RHEL 7 minor releases are listed. --# The following will assign them properly to __sap_hana_preconfigure_min_packages. --# If variable __sap_hana_preconfigure_min_packages_VERSION is not defined, __sap_hana_preconfigure_min_packages will be undefined as well. -+# The following will assign them properly to __sap_hana_preconfigure_min_pkgs. -+# If variable __sap_hana_preconfigure_min_packages_VERSION is not defined, -+# variable __sap_hana_preconfigure_min_pkgs will be undefined as well. - --__sap_hana_preconfigure_min_packages_7.2: -+__sap_hana_preconfigure_min_packages_7_2: - - [ 'kernel' , '3.10.0-327.62.4.el7' ] - - [ 'systemd' , '219-19.el7_2.4' ] - --__sap_hana_preconfigure_min_packages_7.3: -+__sap_hana_preconfigure_min_packages_7_3: - - [ 'kernel' , '3.10.0-514.36.5.el7' ] - - [ 'glibc' , '2.17-157.el7_3.5' ] - - [ 'tuned-profiles-sap-hana' , '2.7.1-3.el7_3.3' ] - --__sap_hana_preconfigure_min_packages_7.4: -+__sap_hana_preconfigure_min_packages_7_4: - - [ 'kernel' , '3.10.0-693.11.6.el7' ] - - [ 'tuned-profiles-sap-hana' , '2.8.0-5.el7_4.2' ] - - # SAP note 2812427: --__sap_hana_preconfigure_min_packages_7.5: -+__sap_hana_preconfigure_min_packages_7_5: - - [ 'kernel' , '3.10.0-862.41.1.el7' ] - - # SAP note 2812427: --__sap_hana_preconfigure_min_packages_7.6: -+__sap_hana_preconfigure_min_packages_7_6: - - [ 'kernel' , '3.10.0-957.27.4.el7' ] - - # SAP note 2812427: --__sap_hana_preconfigure_min_packages_7.7: -+__sap_hana_preconfigure_min_packages_7_7: - - [ 'kernel' , '3.10.0-1062.1.1.el7' ] - --# Empty definitions for upcoming RHEL 7 minor releases: --__sap_hana_preconfigure_min_packages_7.8: -+__sap_hana_preconfigure_min_packages_7_8: - --__sap_hana_preconfigure_min_packages_7.9: -+__sap_hana_preconfigure_min_packages_7_9: - --__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string ) }}" -+__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") ) }}" - - __sap_hana_preconfigure_packages: - # SAP note 2009879: -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 1ea7a88..3975dad 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -50,8 +50,52 @@ __sap_hana_preconfigure_required_ppc64le: - - ppc64-diag - - IBMinvscout - --# Minimum required package levels for RHEL 8: --__sap_hana_preconfigure_min_packages_8: -+# In SAP Note 2777782, certain minimal required packages for the different RHEL 8 minor releases are listed. -+# The following will assign them properly to __sap_hana_preconfigure_min_pkgs. -+# If variable __sap_hana_preconfigure_min_packages_VERSION_ARCH is not defined, -+# variable __sap_hana_preconfigure_min_pkgs will be undefined as well. -+ -+# Minimum required package levels for RHEL 8.0: -+__sap_hana_preconfigure_min_packages_8_0_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_0_ppc64le: -+ - [ 'kernel' , '4.18.0-80.15.1.el8_0' ] -+ -+__sap_hana_preconfigure_min_packages_8_1_x86_64: -+ - [ 'kernel' , '4.18.0-147.5.1.el8_1' ] -+ -+__sap_hana_preconfigure_min_packages_8_1_ppc64le: -+ - [ 'kernel' , '4.18.0-147.5.1.el8_1' ] -+ -+__sap_hana_preconfigure_min_packages_8_2_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_2_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_3_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_3_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_4_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_4_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_5_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_5_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_6_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_6_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_7_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_7_ppc64le: -+ -+__sap_hana_preconfigure_min_packages_8_8_x86_64: -+ -+__sap_hana_preconfigure_min_packages_8_8_ppc64le: -+ -+__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture) }}" - - __sap_hana_preconfigure_packages: - # SAP NOTE 2772999: diff --git a/sap-hana-preconfigure-#95-#96-c11288a8354bf14f665e2ec92ff6b49f6828edfc.patch b/sap-hana-preconfigure-#95-#96-c11288a8354bf14f665e2ec92ff6b49f6828edfc.patch deleted file mode 100644 index f228ea4..0000000 --- a/sap-hana-preconfigure-#95-#96-c11288a8354bf14f665e2ec92ff6b49f6828edfc.patch +++ /dev/null @@ -1,85 +0,0 @@ -commit c11288a8354bf14f665e2ec92ff6b49f6828edfc -Author: Bernd Finger -Date: Fri Jun 19 17:00:51 2020 +0200 - - - fixed minimum package version comparison when package name contains ".el" (upstream issue #95) - - no longer install package groups in this role (upstream issue #96) - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 09e9c5f..7995d99 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -22,10 +22,6 @@ - - when: sap_hana_preconfigure_enable_sap_hana_repos - --#- name: Ensure that the RHEL minor relase is fixed --# rhsm_release: --# release: "{{ ansible_distribution_version }}" -- - - name: Detect if the minor RHEL release is set - shell: subscription-manager release --show | awk '{print $NF}' - register: subscription_manager_release_result -@@ -39,11 +35,6 @@ - - sap_hana_preconfigure_set_minor_release - - subscription_manager_release_result.stdout != ansible_distribution_version - --- name: Ensure required package groups are installed -- package: -- state: present -- name: "{{ __sap_hana_preconfigure_packagegroups }}" -- - - name: Ensure required packages are installed - package: - state: present -@@ -84,8 +75,10 @@ - shell: | - set -x - required_pkg={{ pkg | join('-') }} -- newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sort -V | tail -1) -- if [ $newest == $required_pkg ]; then -+# newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sort -V | tail -1) -+ newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| awk '{gsub ("\\.el", ".0.0."); print}' | sort -V | tail -1) -+# if [ $newest == $required_pkg ]; then -+ if [ $newest == ${required_pkg/.el/.0.0.} ]; then - echo $newest - fi - loop: "{{ sap_hana_preconfigure_min_pkgs }}" -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 9afd8ee..30c6d38 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -123,19 +123,6 @@ __sap_hana_preconfigure_packages: - # libtool-ltdl: See https://answers.sap.com/questions/476177/hana-db-installation-ended-with-exit-code-127.html - # This is required since HANA 2 SPS 03, and so we always install it. - --__sap_hana_preconfigure_packagegroups_x86_64: -- - "@base" -- - "@large-systems" -- - "@network-file-system-client" -- - "@performance" -- - "@compat-libraries" -- --__sap_hana_preconfigure_packagegroups_ppc64le: -- - "@base" -- - "@compat-libraries" -- --__sap_hana_preconfigure_packagegroups: "{{ lookup('vars','__sap_hana_preconfigure_packagegroups_' + ansible_architecture|string ) }}" -- - # Network related kernel parameters as set in SAP Note 2382421: - __sap_hana_preconfigure_kernel_parameters_default: - # The following two parameter should always be set: -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index e3c5767..1ea7a88 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -83,9 +83,6 @@ __sap_hana_preconfigure_packages: - # SAP NOTE 2777782: - - tuned-profiles-sap-hana - --__sap_hana_preconfigure_packagegroups: -- - "@base" -- - # Network related kernel parameters as set in SAP Note 2382421: - __sap_hana_preconfigure_kernel_parameters_default: - # The following two parameter should always be set: diff --git a/sap-hana-preconfigure-#98-6a417012022f38534ae5a5803062639446c9fa81.patch b/sap-hana-preconfigure-#98-6a417012022f38534ae5a5803062639446c9fa81.patch deleted file mode 100644 index 3ca77b4..0000000 --- a/sap-hana-preconfigure-#98-6a417012022f38534ae5a5803062639446c9fa81.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 6a417012022f38534ae5a5803062639446c9fa81 -Author: Bernd Finger -Date: Thu Jul 16 19:26:58 2020 +0200 - - solve issue #98 (basic reboot requirement detection for RHEL 8.0) - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 0a8e1c2..502e94f 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -138,9 +138,19 @@ - when: - - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == '8' -+ - ansible_distribution_version != '8.0' -+ -+- set_fact: -+ needs_restarting_command: "_IKRNL=$(rpm -q --last kernel | awk 'NR==1{sub(/kernel-/,\"\"); print $1}'); _CKRNL=$(uname -r); if [ ${_IKRNL} != ${_CKRNL} ]; then exit 1; else exit 0; fi" -+ when: -+ - ansible_os_family == 'RedHat' -+ - ansible_distribution_version == '8.0' -+ -+- debug: -+ var: needs_restarting_command - - - name: Check if system needs to be restarted -- command: "{{ needs_restarting_command }}" -+ shell: "{{ needs_restarting_command }}" - register: needs_restarting_result - ignore_errors: true - changed_when: false -@@ -148,6 +158,9 @@ - warn: false - check_mode: false - -+- debug: -+ var: needs_restarting_result -+ - - name: Call Reboot handler if necessary - command: /bin/true - notify: "Reboot handler" diff --git a/sap-hana-preconfigure-#99-d64615413b0bd7741bd6d8e06e5676be36a24c41.patch b/sap-hana-preconfigure-#99-d64615413b0bd7741bd6d8e06e5676be36a24c41.patch deleted file mode 100644 index 3cf41d5..0000000 --- a/sap-hana-preconfigure-#99-d64615413b0bd7741bd6d8e06e5676be36a24c41.patch +++ /dev/null @@ -1,37 +0,0 @@ -commit d64615413b0bd7741bd6d8e06e5676be36a24c41 -Author: Bernd Finger -Date: Fri Jun 19 20:10:41 2020 +0200 - - Show also the install status of the IBM tools - -diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml -index 9ba248c..fcacce6 100644 ---- a/tasks/RedHat/installation.yml -+++ b/tasks/RedHat/installation.yml -@@ -47,6 +47,7 @@ - register: result - ignore_errors: True - changed_when: false -+ - - debug: - var: result.results - -@@ -69,6 +70,18 @@ - name: "{{ __sap_hana_preconfigure_required_ppc64le }}" - when: ansible_architecture == "ppc64le" - -+- name: Get status of installed IBM Tools -+ yum: -+ name: "{{ __sap_hana_preconfigure_required_ppc64le }}" -+ register: ibm_result -+ ignore_errors: True -+ changed_when: false -+ when: ansible_architecture == "ppc64le" -+ -+- debug: -+ var: ibm_result.results -+ when: ansible_architecture == "ppc64le" -+ - - name: Ensure minimum packages are installed - block: - - name: Gather package facts diff --git a/sap-hana-preconfigure-2.0.0.patch b/sap-hana-preconfigure-2.0.0.patch deleted file mode 100644 index 1949f5e..0000000 --- a/sap-hana-preconfigure-2.0.0.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/README.md b/README.md -index 61caab5..efb60f1 100644 ---- a/README.md -+++ b/README.md -@@ -89,6 +89,7 @@ sap_hana_preconfigure_2292690_[01...07,09,10], example: sap_hana_preconfigure_22 - sap_hana_preconfigure_2009879_3_9 - sap_hana_preconfigure_2009879_3_13 - sap_hana_preconfigure_2009879_3_14_[1...4] -+sap_hana_preconfigure_2009879_3_15 - sap_hana_preconfigure_2382421 - ``` - -diff --git a/tasks/RedHat/configuration.yml b/tasks/RedHat/configuration.yml -index 0216a99..f0bcbd4 100644 ---- a/tasks/RedHat/configuration.yml -+++ b/tasks/RedHat/configuration.yml -@@ -8,6 +8,11 @@ - debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) - -+# We want to disable firewalld, so we need to check if firewalld is installed -+- name: Gather facts about installed packages -+ package_facts: -+ manager: auto -+ - - name: include configuration actions for required sapnotes - include_tasks: "sapnote/{{ item }}.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" -diff --git a/tasks/RedHat/generic/configure-epb.yml b/tasks/RedHat/generic/configure-epb.yml -index 71d8b91..f74ec7f 100644 ---- a/tasks/RedHat/generic/configure-epb.yml -+++ b/tasks/RedHat/generic/configure-epb.yml -@@ -21,7 +21,7 @@ - file: - path: /etc/init.d/boot.local - state: touch -- mode: 0644 -+ mode: 0755 - - - name: Configure EPB at boot time - lineinfile: -diff --git a/tasks/RedHat/generic/disable-firewall.yml b/tasks/RedHat/generic/disable-firewall.yml -index 151d045..1bc6596 100644 ---- a/tasks/RedHat/generic/disable-firewall.yml -+++ b/tasks/RedHat/generic/disable-firewall.yml -@@ -1,16 +1,14 @@ - --- --- name: Gathering service facts -- service_facts: -- register: services_state -+ -+- debug: -+ msg: "imported RedHat/generic/configure-firewall.yml" - - - name: Stop and disable service firewalld - systemd: - name: firewalld - state: stopped - enabled: no -- when: services_state.ansible_facts.services["firewalld.service"].state is defined -- --- debug: var=services_state.ansible_facts.services["firewalld.service"].state -+ when: "'firewalld' in ansible_facts.packages" - - - name: Get status of firewalld - command: bash -lc "systemctl status firewalld" -diff --git a/tasks/sapnote/2009879_7.yml b/tasks/sapnote/2009879_7.yml -index 793b921..c86b364 100644 ---- a/tasks/sapnote/2009879_7.yml -+++ b/tasks/sapnote/2009879_7.yml -@@ -96,10 +96,7 @@ - ### NYI: Set proper firewall rules if SID/instance number is known - ### - - include_tasks: ../RedHat/generic/disable-firewall.yml --# - name: 3.15 Ensure firewall is disabled when instance ID unknown --# service: name=firewalld state=stopped enabled=no --# ignore_errors: True -- -+ when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_15|d(false) - - ### Firewall Calculation for SID=xx - ################################################################## diff --git a/sap-hana-preconfigure-md2html-error.patch b/sap-hana-preconfigure-md2html-error.patch new file mode 100644 index 0000000..99821ae --- /dev/null +++ b/sap-hana-preconfigure-md2html-error.patch @@ -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 diff --git a/sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch b/sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch deleted file mode 100644 index 8877164..0000000 --- a/sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch +++ /dev/null @@ -1,125 +0,0 @@ -commit db645e39a38070ac0b3fe9f2f447d60e6eedac4a -Author: Bernd Finger -Date: Fri Jun 19 19:25:34 2020 +0200 - - fix Comparing installed versions of a package with the required version is not reliable - -diff --git a/tasks/installation.yml b/tasks/installation.yml -index 8ad40b9..b8788bc 100644 ---- a/tasks/installation.yml -+++ b/tasks/installation.yml -@@ -1,10 +1,10 @@ - --- - # tasks file for sap-preconfigure: installation - --- name: Ensure required package groups are installed -- package: -- state: present -- name: "{{ __sap_preconfigure_packagegroups }}" -+# - name: Ensure required package groups are installed -+# package: -+# state: present -+# name: "{{ __sap_preconfigure_packagegroups }}" - - - name: Ensure required packages are installed - package: -@@ -14,38 +14,67 @@ - - - name: Ensure minimum packages are installed - block: -- - name: check if minimum release needs to be installed -- shell: | -- set -x -- required_pkg={{ pkg | join('-') }} -- newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sort -V | tail -1) -- if [ $newest == $required_pkg ]; then -- echo $newest -- fi -- loop: "{{ __sap_preconfigure_min_pkgs }}" -- loop_control: -- loop_var: pkg -- check_mode: no -- register: __sap_preconfigure_register_minpkglist -- changed_when: false -- -- - name: Initialize an empty list for our strings -- set_fact: -- __sap_preconfigure_fact_minpkglist: [] -- -- - name: Create list of packages to be installed -- set_fact: -- __sap_preconfigure_fact_minpkglist: "{{ __sap_preconfigure_fact_minpkglist | difference(['']) + [ pkg.stdout ] }}" -- loop: "{{ __sap_preconfigure_register_minpkglist.results }}" -- loop_control: -- loop_var: pkg -- - debug: var=__sap_preconfigure_fact_minpkglist -- -- - name: Install minimum packages if required -- package: -- name: "{{ __sap_preconfigure_fact_minpkglist }}" -- state: present -- when: not ( __sap_preconfigure_fact_minpkglist == [ "" ] ) -+ - name: Gather package facts -+ package_facts: -+ -+ - set_fact: -+ reqpkgs: "{{ __sap_preconfigure_min_pkgs }}" -+ -+ - debug: -+ var: reqpkgs -+ -+ - set_fact: -+ sap_preconfigure_fact_minpkglist: |- -+ {% set ns = namespace() %} -+ {% set ns.pkgs = [] %} -+ {% for reqpkg in reqpkgs %} -+ {% if not reqpkg[0] in ansible_facts.packages %} -+ {% set _ = ns.pkgs.append(reqpkg | join('-')) %} -+ {% else %} -+ {% set pkg = ansible_facts.packages[reqpkg[0]][-1] %} -+ {% set verrel = pkg.version ~ '-' ~ pkg.release %} -+ {% if reqpkg[1].replace (".el", ".0.0.") is version(verrel.replace (".el", ".0.0."), '>', strict=false) %} -+ {% set _ = ns.pkgs.append(reqpkg | join('-')) %} -+ {% else %} -+ {% set _ = "pkg already installed with same or later version" %} -+ {% endif %} -+ {% endif %} -+ {% endfor %} -+ {{ ns.pkgs }} -+ -+# - name: check if minimum release needs to be installed -+# shell: | -+# set -x -+# required_pkg={{ pkg | join('-') }} -+# newest=$(echo -e "$required_pkg\n$(rpm -q {{ pkg[0] }} )"| sort -V | tail -1) -+# if [ $newest == $required_pkg ]; then -+# echo $newest -+# fi -+# loop: "{{ __sap_preconfigure_min_pkgs }}" -+# loop_control: -+# loop_var: pkg -+# check_mode: no -+# register: __sap_preconfigure_register_minpkglist -+# changed_when: false -+ -+# - name: Initialize an empty list for our strings -+# set_fact: -+# __sap_preconfigure_fact_minpkglist: [] -+ -+# - name: Create list of packages to be installed -+# set_fact: -+# __sap_preconfigure_fact_minpkglist: "{{ __sap_preconfigure_fact_minpkglist | difference(['']) + [ pkg.stdout ] }}" -+# loop: "{{ __sap_preconfigure_register_minpkglist.results }}" -+# loop_control: -+# loop_var: pkg -+ -+ - debug: var=sap_preconfigure_fact_minpkglist -+ -+ - name: Install minimum packages if required -+ yum: -+ name: "{{ sap_preconfigure_fact_minpkglist }}" -+ state: present -+ when: not ( sap_preconfigure_fact_minpkglist == [ "" ] ) - - when: - - sap_preconfigure_min_package_check|bool diff --git a/sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch b/sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch deleted file mode 100644 index 78c234b..0000000 --- a/sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch +++ /dev/null @@ -1,82 +0,0 @@ -commit b056297b1e54662773d9b63850fdae34d2606fa1 -Author: Bernd Finger -Date: Fri Jun 19 19:50:21 2020 +0200 - - compat-sap-c++-9 not available in RHEL 8 on s390x - -diff --git a/vars/RedHat_8.1.yml b/vars/RedHat_8.1.yml -index 46ec8d6..8871e5d 100644 ---- a/vars/RedHat_8.1.yml -+++ b/vars/RedHat_8.1.yml -@@ -16,7 +16,7 @@ __sap_preconfigure_packagegroups_s390x: - - __sap_preconfigure_packagegroups: "{{ lookup('vars','__sap_preconfigure_packagegroups_' + ansible_architecture|string ) }}" - --__sap_preconfigure_packages: -+__sap_preconfigure_packages_x86_64: - - uuidd - - libnsl - - tcsh -@@ -25,6 +25,25 @@ __sap_preconfigure_packages: - - bind-utils - - compat-sap-c++-9 - -+__sap_preconfigure_packages_ppc64le: -+ - uuidd -+ - libnsl -+ - tcsh -+ - psmisc -+ - nfs-utils -+ - bind-utils -+ - compat-sap-c++-9 -+ -+__sap_preconfigure_packages_s390x: -+ - uuidd -+ - libnsl -+ - tcsh -+ - psmisc -+ - nfs-utils -+ - bind-utils -+ -+__sap_preconfigure_packages: "{{ lookup('vars','__sap_preconfigure_packages_' + ansible_architecture|string ) }}" -+ - __sap_preconfigure_min_pkgs: - - [ 'setup' , '2.12.2-2.el8_1.1' ] - -diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml -index 95c8ab2..4058b28 100644 ---- a/vars/RedHat_8.yml -+++ b/vars/RedHat_8.yml -@@ -16,7 +16,7 @@ __sap_preconfigure_packagegroups_s390x: - - __sap_preconfigure_packagegroups: "{{ lookup('vars','__sap_preconfigure_packagegroups_' + ansible_architecture|string ) }}" - --__sap_preconfigure_packages: -+__sap_preconfigure_packages_x86_64: - - uuidd - - libnsl - - tcsh -@@ -25,4 +25,23 @@ __sap_preconfigure_packages: - - bind-utils - - compat-sap-c++-9 - -+__sap_preconfigure_packages_ppc64le: -+ - uuidd -+ - libnsl -+ - tcsh -+ - psmisc -+ - nfs-utils -+ - bind-utils -+ - compat-sap-c++-9 -+ -+__sap_preconfigure_packages_s390x: -+ - uuidd -+ - libnsl -+ - tcsh -+ - psmisc -+ - nfs-utils -+ - bind-utils -+ -+__sap_preconfigure_packages: "{{ lookup('vars','__sap_preconfigure_packages_' + ansible_architecture|string ) }}" -+ - ... diff --git a/sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch b/sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch deleted file mode 100644 index f1ec990..0000000 --- a/sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 6be65f40569044307bbf41038b766ff571a08025 -Author: Bernd Finger -Date: Mon Jun 22 15:01:22 2020 +0200 - - "@" needs to be prepended to sap_preconfigure_db_group_name - -diff --git a/tasks/sapnote/2002167/05-process-resource-limits.yml b/tasks/sapnote/2002167/05-process-resource-limits.yml -index 4e0b4a2..a116cbf 100644 ---- a/tasks/sapnote/2002167/05-process-resource-limits.yml -+++ b/tasks/sapnote/2002167/05-process-resource-limits.yml -@@ -21,7 +21,7 @@ - - name: Set the hard and soft limit for the max number of open files per process (nofile) to 32800 for the database group - pam_limits: - dest: /etc/security/limits.d/99-sap.conf -- domain: "{{ sap_preconfigure_db_group_name }} " -+ domain: "@{{ sap_preconfigure_db_group_name }}" - limit_item: nofile - limit_type: "{{ line_item }}" - value: "32800" -@@ -44,7 +44,7 @@ - - name: Set the soft limit for the max number of processes per user (nproc) to unlimited for the database group - pam_limits: - dest: /etc/security/limits.d/99-sap.conf -- domain: "{{ sap_preconfigure_db_group_name }} " -+ domain: "@{{ sap_preconfigure_db_group_name }}" - limit_item: nproc - limit_type: soft - value: unlimited -diff --git a/tasks/sapnote/2772999/09-configure-process-resource-limits.yml b/tasks/sapnote/2772999/09-configure-process-resource-limits.yml -index e7d51f6..7247f77 100644 ---- a/tasks/sapnote/2772999/09-configure-process-resource-limits.yml -+++ b/tasks/sapnote/2772999/09-configure-process-resource-limits.yml -@@ -21,7 +21,7 @@ - - name: Set the hard and soft limit for the max number of open files per process (nofile) to 65536 for the database group - pam_limits: - dest: /etc/security/limits.d/99-sap.conf -- domain: "{{ sap_preconfigure_db_group_name }} " -+ domain: "@{{ sap_preconfigure_db_group_name }}" - limit_item: nofile - limit_type: "{{ line_item }}" - value: "65536" diff --git a/sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch b/sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch deleted file mode 100644 index 52caa1b..0000000 --- a/sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 70cd0f9f8b0f7de3e48c1af041a0d63443445052 -Author: Bernd Finger -Date: Thu Jun 25 18:26:30 2020 +0200 - - use strings instead of int in sysctl module - -diff --git a/tasks/sapnote/2002167/04-linux-kernel-parameters.yml b/tasks/sapnote/2002167/04-linux-kernel-parameters.yml -index e5625fb..560edde 100644 ---- a/tasks/sapnote/2002167/04-linux-kernel-parameters.yml -+++ b/tasks/sapnote/2002167/04-linux-kernel-parameters.yml -@@ -14,8 +14,8 @@ - sysctl_set: yes - reload: yes - with_items: -- - { name: kernel.sem, value: "1250 256000 100 1024" } -- - { name: vm.max_map_count, value: 2000000 } -+ - { name: kernel.sem, value: '1250 256000 100 1024' } -+ - { name: vm.max_map_count, value: '2000000' } - loop_control: - loop_var: line_item - -diff --git a/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml b/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml -index 6c53b0a..2b7d50b 100644 ---- a/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml -+++ b/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml -@@ -9,7 +9,7 @@ - sysctl: - sysctl_file: /etc/sysctl.d/sap.conf - name: vm.max_map_count -- value: 2147483647 -+ value: '2147483647' - state: present - sysctl_set: yes - reload: yes diff --git a/sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch b/sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch deleted file mode 100644 index 6ed839f..0000000 --- a/sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch +++ /dev/null @@ -1,42 +0,0 @@ -commit 77e02082ae0784f88eab8f9d0f764c3981b9cf6d -Author: Bernd Finger -Date: Wed Jul 15 12:19:16 2020 +0200 - - solve issue #84: Do not fail if there is more than one line with identical IP adresses - -diff --git a/tasks/RedHat/generic/configure-etc-hosts.yml b/tasks/RedHat/generic/configure-etc-hosts.yml -index 35ffd8b..304bb36 100644 ---- a/tasks/RedHat/generic/configure-etc-hosts.yml -+++ b/tasks/RedHat/generic/configure-etc-hosts.yml -@@ -18,7 +18,6 @@ - }' /etc/hosts - register: sap_base_settings_register_hostname_aliases - changed_when: false -- check_mode: false - - - name: Print hostname aliases - debug: -@@ -30,7 +29,6 @@ - command: bash -lc "awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts" - register: command_result - changed_when: false -- check_mode: false - - debug: - var: command_result.stdout_lines, command_result.stderr_lines - - debug: -@@ -64,6 +62,7 @@ - when: - - sap_preconfigure_modify_etc_hosts | bool - -+# We will allow more than one line containing sap_ip: - - name: Check for duplicate entries of {{ sap_ip }} in /etc/hosts - shell: | - n=$(grep "^{{ sap_ip }}\s" /etc/hosts | wc -l) -@@ -74,6 +73,7 @@ - exit 1 - fi - changed_when: false -+ ignore_errors: yes - when: not ansible_check_mode - - - name: Check for duplicate entries of hostname and fqdn in /etc/hosts diff --git a/sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch b/sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch deleted file mode 100644 index e75271a..0000000 --- a/sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 840cafb7487687369d3597e6f9e21895da702094 -Author: Bernd Finger -Date: Wed Jul 15 14:21:27 2020 +0200 - - solve issues #85, #86 - -diff --git a/tasks/RedHat/generic/configure-etc-hosts.yml b/tasks/RedHat/generic/configure-etc-hosts.yml -index 304bb36..18872d1 100644 ---- a/tasks/RedHat/generic/configure-etc-hosts.yml -+++ b/tasks/RedHat/generic/configure-etc-hosts.yml -@@ -16,7 +16,7 @@ - if (( $i != "{{ sap_hostname }}" ) && ( $i != "{{ sap_hostname }}.{{ sap_domain }}" )) { printf $i" " } - } - }' /etc/hosts -- register: sap_base_settings_register_hostname_aliases -+ register: sap_hostname_aliases - changed_when: false - - - name: Print hostname aliases -@@ -54,12 +54,22 @@ - msg: - - "System {{ sap_hostname }}, {{ sap_hostname }}.{{ sap_domain }} has ipv4 address {{ sap_ip }}." - -+- debug: -+ msg: -+ - "Hostname alias(es) found: {{ sap_hostname_aliases.stdout }}. So /etc/hosts will not be modified." -+ when: -+ - sap_hostname_aliases.stdout != '' -+ - sap_preconfigure_modify_etc_hosts | bool -+ -+# We only modify /etc/hosts if there is no hostname alias defined: - - name: Ensure that the entry in /etc/hosts is correct - lineinfile: - path: /etc/hosts - regexp: '^{{ sap_ip }}\s' -- line: "{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }} {{ sap_base_settings_register_hostname_aliases.stdout }}" -+ line: "{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }}" -+ backup: yes - when: -+ - sap_hostname_aliases.stdout == '' - - sap_preconfigure_modify_etc_hosts | bool - - # We will allow more than one line containing sap_ip: diff --git a/sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch b/sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch deleted file mode 100644 index f2531e6..0000000 --- a/sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch +++ /dev/null @@ -1,110 +0,0 @@ -commit 110d870eaac2efee2e131babacebc5337a15b3e3 -Author: Bernd Finger -Date: Thu Jul 16 11:56:22 2020 +0200 - - do not modify /etc/hosts if there is more than one line containing sap_ip - -diff --git a/tasks/RedHat/generic/check-dns-name-resolution.yml b/tasks/RedHat/generic/check-dns-name-resolution.yml -index 9450b60..b7b915d 100644 ---- a/tasks/RedHat/generic/check-dns-name-resolution.yml -+++ b/tasks/RedHat/generic/check-dns-name-resolution.yml -@@ -9,11 +9,12 @@ - - "sap_domain = {{ sap_domain }}" - - "sap_ip = {{ sap_ip }}" - --- name: Verify that the DNS domain is set -- assert: -- that: -- not( (sap_domain is undefined) or (sap_domain is none) or (sap_domain | trim == '') ) -- msg: "You need to define the variable 'sap_domain' in defaults/main.yml." -+# moved to configure-etc-hosts.yml: -+#- name: Verify that the DNS domain is set -+# assert: -+# that: -+# not( (sap_domain is undefined) or (sap_domain is none) or (sap_domain | trim == '') ) -+# msg: "You need to define the variable 'sap_domain' in defaults/main.yml." - - ### DNS is not that necessary and as such the errors are ignored - ### for production it is strongly recommended to have proper DNS setup -diff --git a/tasks/RedHat/generic/configure-etc-hosts.yml b/tasks/RedHat/generic/configure-etc-hosts.yml -index 18872d1..488fba7 100644 ---- a/tasks/RedHat/generic/configure-etc-hosts.yml -+++ b/tasks/RedHat/generic/configure-etc-hosts.yml -@@ -13,7 +13,7 @@ - shell: | - awk '( $1 == "{{ sap_ip }}" ) { - for (i=2; i<=NF; ++i) { -- if (( $i != "{{ sap_hostname }}" ) && ( $i != "{{ sap_hostname }}.{{ sap_domain }}" )) { printf $i" " } -+ if (( $i != "{{ sap_hostname }}" ) && ( $i != "{{ sap_hostname }}.{{ sap_domain }}" )) { printf " "$i } - } - }' /etc/hosts - register: sap_hostname_aliases -@@ -54,39 +54,48 @@ - msg: - - "System {{ sap_hostname }}, {{ sap_hostname }}.{{ sap_domain }} has ipv4 address {{ sap_ip }}." - -+# We allow more than one line containing sap_ip: -+- name: Check for duplicate entries of {{ sap_ip }} in /etc/hosts -+ shell: | -+ n=$(grep "^{{ sap_ip }}\s" /etc/hosts | wc -l) -+ if [ $n -gt 1 ]; then -+ echo "Duplicate IP entry in /etc/hosts!" -+ exit 1 -+ else -+ exit 0 -+ fi -+ register: shell_result -+ changed_when: false -+ ignore_errors: yes -+ when: not ansible_check_mode -+ -+- name: Verify that variable sap_domain is set -+ assert: -+ that: -+ not( (sap_domain is undefined) or (sap_domain is none) or (sap_domain | trim == '') ) -+ msg: "Variable 'sap_domain' is undefined or empty. Please define it in defaults/main.yml or via --extra-vars!" -+ - - debug: - msg: -- - "Hostname alias(es) found: {{ sap_hostname_aliases.stdout }}. So /etc/hosts will not be modified." -+ - "More than one line containing {{ sap_ip }}. File /etc/hosts will not be modified." - when: -- - sap_hostname_aliases.stdout != '' -+ - not ansible_check_mode -+ - shell_result.stdout == 'Duplicate IP entry in /etc/hosts!' - - sap_preconfigure_modify_etc_hosts | bool - --# We only modify /etc/hosts if there is no hostname alias defined: - - name: Ensure that the entry in /etc/hosts is correct - lineinfile: - path: /etc/hosts - regexp: '^{{ sap_ip }}\s' -- line: "{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }}" -+ line: "{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }}{{sap_hostname_aliases.stdout }}" - backup: yes - when: -- - sap_hostname_aliases.stdout == '' -+ - not ansible_check_mode -+ - sap_domain != '' -+ - shell_result.stdout != 'Duplicate IP entry in /etc/hosts!' - - sap_preconfigure_modify_etc_hosts | bool - --# We will allow more than one line containing sap_ip: --- name: Check for duplicate entries of {{ sap_ip }} in /etc/hosts -- shell: | -- n=$(grep "^{{ sap_ip }}\s" /etc/hosts | wc -l) -- if [ $n -eq 1 ]; then -- exit 0 -- else -- echo "Duplicate IP entry in /etc/hosts!" -- exit 1 -- fi -- changed_when: false -- ignore_errors: yes -- when: not ansible_check_mode -- --- name: Check for duplicate entries of hostname and fqdn in /etc/hosts -+- name: Check for duplicate or missing entries of hostname and fqdn in /etc/hosts - shell: | - n=$(grep -w "{{ line_item }}" /etc/hosts | wc -l) - if [ $n -eq 1 ]; then diff --git a/sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch b/sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch deleted file mode 100644 index 0e4a7d1..0000000 --- a/sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 7595b96fbd6a7360d62413734bc652ed4c5e2771 -Author: Bernd Finger -Date: Thu Jul 16 19:18:43 2020 +0200 - - solve issue #88 (reboot requirement detection for RHEL 8.0) - -diff --git a/tasks/installation.yml b/tasks/installation.yml -index 40076e5..11d80ed 100644 ---- a/tasks/installation.yml -+++ b/tasks/installation.yml -@@ -72,9 +72,19 @@ - when: - - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == '8' -+ - ansible_distribution_version != '8.0' -+ -+- set_fact: -+ needs_restarting_command: "_IKRNL=$(rpm -q --last kernel | awk 'NR==1{sub(/kernel-/,\"\"); print $1}'); _CKRNL=$(uname -r); if [ ${_IKRNL} != ${_CKRNL} ]; then exit 1; else exit 0; fi" -+ when: -+ - ansible_os_family == 'RedHat' -+ - ansible_distribution_version == '8.0' -+ -+- debug: -+ var: needs_restarting_command - - - name: Check if system needs to be restarted -- command: "{{ needs_restarting_command }}" -+ shell: "{{ needs_restarting_command }}" - register: needs_restarting_result - ignore_errors: true - changed_when: false -@@ -82,6 +92,9 @@ - warn: false - check_mode: false - -+- debug: -+ var: needs_restarting_result -+ - - name: Call Reboot handler if necessary - command: /bin/true - notify: "Reboot handler" diff --git a/sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch b/sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch deleted file mode 100644 index 9355493..0000000 --- a/sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch +++ /dev/null @@ -1,53 +0,0 @@ -commit 3f3c93eaddfafd08132017058b0b330108d2bd2c -Author: Bernd Finger -Date: Tue Jul 28 15:26:57 2020 +0200 - - 89 - Minimum kernel versions from SAP note 2812427 need to be moved to sap-preconfigure - -diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml -index 8209443..1e5c661 100644 ---- a/vars/RedHat_7.yml -+++ b/vars/RedHat_7.yml -@@ -36,4 +36,28 @@ __sap_preconfigure_packages: - - compat-sap-c++-7 - - compat-sap-c++-9 - -+__sap_preconfigure_min_packages_7_2: -+ -+__sap_preconfigure_min_packages_7_3: -+ -+# SAP note 2812427: -+__sap_preconfigure_min_packages_7_4: -+ - [ 'kernel' , '3.10.0-693.58.1.el7' ] -+ -+# SAP note 2812427: -+__sap_preconfigure_min_packages_7_5: -+ - [ 'kernel' , '3.10.0-862.43.1.el7' ] -+ -+# SAP note 2812427: -+__sap_preconfigure_min_packages_7_6: -+ - [ 'kernel' , '3.10.0-957.35.1.el7' ] -+ -+__sap_preconfigure_min_packages_7_7: -+ -+__sap_preconfigure_min_packages_7_8: -+ -+__sap_preconfigure_min_packages_7_9: -+ -+__sap_preconfigure_min_pkgs: "{{ lookup('vars','__sap_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\")) }}" -+ - ... -diff --git a/vars/RedHat_8.0.yml b/vars/RedHat_8.0.yml -index f95a098..356d398 100644 ---- a/vars/RedHat_8.0.yml -+++ b/vars/RedHat_8.0.yml -@@ -24,7 +24,9 @@ __sap_preconfigure_packages: - - nfs-utils - - bind-utils - -+# SAP notes 2772999 (setup) and 2812427 (kernel): - __sap_preconfigure_min_pkgs: - - [ 'setup' , '2.12.2-2.el8_0.1' ] -+ - [ 'kernel' , '4.18.0-80.15.1.el8_0' ] - - ... diff --git a/sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch b/sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch deleted file mode 100644 index d38d714..0000000 --- a/sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit db1ed07c66286edbee756ed3504649975d333306 -Author: Bernd Finger -Date: Wed Aug 19 10:30:21 2020 +0200 - - issue #92: changed nofile from 32800 to 65536 as per recent changes to SAP note 2002167 - -diff --git a/tasks/sapnote/2002167/05-process-resource-limits.yml b/tasks/sapnote/2002167/05-process-resource-limits.yml -index a116cbf..324dd9b 100644 ---- a/tasks/sapnote/2002167/05-process-resource-limits.yml -+++ b/tasks/sapnote/2002167/05-process-resource-limits.yml -@@ -5,26 +5,26 @@ - - debug: - msg: "SAP note 2002167 Step 5: Process Resource Limits" - --- name: Set the hard and soft limit for the max number of open files per process (nofile) to 32800 for group sapsys -+- name: Set the hard and soft limit for the max number of open files per process (nofile) to 65536 for group sapsys - pam_limits: - dest: /etc/security/limits.d/99-sap.conf - domain: "@sapsys" - limit_item: nofile - limit_type: "{{ line_item }}" -- value: "32800" -+ value: "65536" - with_items: - - hard - - soft - loop_control: - loop_var: line_item - --- name: Set the hard and soft limit for the max number of open files per process (nofile) to 32800 for the database group -+- name: Set the hard and soft limit for the max number of open files per process (nofile) to 65536 for the database group - pam_limits: - dest: /etc/security/limits.d/99-sap.conf - domain: "@{{ sap_preconfigure_db_group_name }}" - limit_item: nofile - limit_type: "{{ line_item }}" -- value: "32800" -+ value: "65536" - with_items: - - hard - - soft diff --git a/sources b/sources index d291e82..e4c6efb 100644 --- a/sources +++ b/sources @@ -1,3 +1,6 @@ -SHA512 (sap-hana-preconfigure.tar.gz) = deaf969d75cb47e5e2cfc1d6a82698c24aaf8c2f9eb2761254b196e93289adb5313258182912f9237501baa5d4f583ea9b9bdebbd8185222e8de69e0e0fb1ab4 -SHA512 (sap-netweaver-preconfigure.tar.gz) = b6bb287928f5ae7d87b8801ac5469b419cedd5350d8ba9db6e210e5c23411c356688f6bfe28c2f3c2161c162972f5ca796c40ba5fa0b4cc71339cc471edde957 -SHA512 (sap-preconfigure.tar.gz) = dda6a9916269f8a9f750a99acd5414c4915ba57391db0a9db47ea97fae0610b787ad54f6491047c2a5c6884f3e13dd9093955491f5128779d3717705a9f407ca +SHA512 (auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz) = 5cbbd64ccb77c8ecd9cf20eb55747fc51e539692bc20d746ecf63345b64dda5cddb3e6f1c69f684495247e329f2930f46147c8fcd851e5a47fd27471cb5ec0b5 +SHA512 (sap-hana-preconfigure-9acfe7bb4b832303a302a728464a828b1ead7ca0.tar.gz) = 798f443e016789075673dcd477e530a454767b63b83c573a04d650e9ec0e5a27e4a1cf448812f0ad69c2e8ea80ef6353961d57e5c799a17e9edd64df3df990b0 +SHA512 (sap-netweaver-preconfigure-337ba5580ba862e1adac59dcda8a126cdf561225.tar.gz) = df2480591acc2933e7603006e4e6e309c6ff74efc21ab329a1094a0c84bbfe65de797d8f878ef43e5dbeee6eb5d029ac7cd528a75ba871cc83939c865b7042ac +SHA512 (sap-preconfigure-ce400b56d217571e2e9acd3e2558817333c673da.tar.gz) = f48d0cdef2f1b0ce4a77bdb6c28860a27f8a7b33f83e5169deb975d93b9d1e262c63a1c09eb7612fcc48b0cc68c1bd1a7a5b6232bf5338c2220fb41d569fe0fe +SHA512 (galaxy.yml) = 6fb23d6100e2ad9c19dc4b2baa671a1f7cb9516a86601e79dcebf5a479c21d212c95a5b86b620c61114d3248a0e676b81e68f8980a621eebd87b8cef97662cb6 +SHA512 (README.md) = ef4fc905c824b1701e27543f7335584406f35873c34915b2aa355a73b8b469d2b7d9d33722769403451f5d7d78127cbb87bfb4f0ae56fdfafe3fc26cc1a44af2