import rhel-system-roles-sap-2.0.0-2.el8
This commit is contained in:
parent
293405a474
commit
a4dd761e78
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
||||
SOURCES/rhel-system-roles-sap-2019-09-30_18-11-12.tar.gz
|
||||
SOURCES/sap-hana-preconfigure.tar.gz
|
||||
SOURCES/sap-netweaver-preconfigure.tar.gz
|
||||
SOURCES/sap-preconfigure.tar.gz
|
||||
|
@ -1 +1,3 @@
|
||||
71a7dd706b059d82346b9ec876bbacc946974d70 SOURCES/rhel-system-roles-sap-2019-09-30_18-11-12.tar.gz
|
||||
9ecaedd62786d616eb51fc09893537ebd8ff7e4f SOURCES/sap-hana-preconfigure.tar.gz
|
||||
435e268e5adf767c382df673b6ee4bac7ddc55a8 SOURCES/sap-netweaver-preconfigure.tar.gz
|
||||
8d8de726e02ee97fe2346938c22d891ea31efa2d SOURCES/sap-preconfigure.tar.gz
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -up rhel-system-roles-sap-0.7.2/sap-hana-preconfigure/vars/RedHat_7.yml.me rhel-system-roles-sap-0.7.2/sap-hana-preconfigure/vars/RedHat_7.yml
|
||||
--- rhel-system-roles-sap-0.7.2/sap-hana-preconfigure/vars/RedHat_7.yml.me 2019-10-15 16:26:41.311466458 +0200
|
||||
+++ rhel-system-roles-sap-0.7.2/sap-hana-preconfigure/vars/RedHat_7.yml 2019-10-15 18:48:35.470383628 +0200
|
||||
@@ -71,6 +71,10 @@ sap_hana_preconfigure_min_packages_7.6:
|
||||
sap_hana_preconfigure_min_packages_7.7:
|
||||
- [ 'kernel' , '3.10.0-1062.1.1.el7' ]
|
||||
|
||||
+## Double check with SAP NOTE 2235581
|
||||
+sap_hana_preconfigure_min_packages_7.8:
|
||||
+ - [ 'kernel' , '3.10.0-1101.el7' ]
|
||||
+
|
||||
sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string ) }}"
|
||||
|
||||
sap_hana_preconfigure_packages:
|
@ -0,0 +1,19 @@
|
||||
commit 063273dd09715cfcf69bcf3c1f4347225028ba70
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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
|
@ -0,0 +1,213 @@
|
||||
commit a622092d5063c2fb0d7996775521a52549e3a65a
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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:
|
@ -0,0 +1,234 @@
|
||||
commit ecb7c33e9a8eddb633189d332683309d398fd54f
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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:
|
@ -0,0 +1,85 @@
|
||||
commit c11288a8354bf14f665e2ec92ff6b49f6828edfc
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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:
|
@ -0,0 +1,37 @@
|
||||
commit d64615413b0bd7741bd6d8e06e5676be36a24c41
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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
|
82
SOURCES/sap-hana-preconfigure-2.0.0.patch
Normal file
82
SOURCES/sap-hana-preconfigure-2.0.0.patch
Normal file
@ -0,0 +1,82 @@
|
||||
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
|
||||
##################################################################
|
@ -1,32 +0,0 @@
|
||||
commit 38a18c2890aa80c4562d002cc557945bdf9c5e7e
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
Date: Tue Oct 1 18:00:59 2019 +0200
|
||||
|
||||
added "LC_ALL=C " before commands for which the outputs are to be evaluated
|
||||
|
||||
diff --git a/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml b/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml
|
||||
index 3cef670..274c7ea 100644
|
||||
--- a/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml
|
||||
+++ b/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml
|
||||
@@ -7,7 +7,7 @@
|
||||
# in included tuned profile throughput-performance
|
||||
- block:
|
||||
- name: Check if system is able to set CPU Governor for performance
|
||||
- command: bash -lc "cpupower frequency-info -g | awk '/available cpufreq governors/{print $(NF-1), $NF}'"
|
||||
+ command: bash -lc "LC_ALL=C cpupower frequency-info -g | awk '/available cpufreq governors/{print $(NF-1), $NF}'"
|
||||
check_mode: no
|
||||
register: command_check_result
|
||||
ignore_errors: true
|
||||
diff --git a/tasks/RedHat/generic/configure-epb.yml b/tasks/RedHat/generic/configure-epb.yml
|
||||
index adf5891..71d8b91 100644
|
||||
--- a/tasks/RedHat/generic/configure-epb.yml
|
||||
+++ b/tasks/RedHat/generic/configure-epb.yml
|
||||
@@ -7,7 +7,7 @@
|
||||
# in included tuned profile throughput-performance
|
||||
- block:
|
||||
- name: Check if system supports Intel's performance bias setting
|
||||
- command: bash -lc "cpupower info | head -1 | awk '{print $2, $3, $4}'"
|
||||
+ command: bash -lc "LC_ALL=C cpupower info | head -1 | awk '{print $2, $3, $4}'"
|
||||
check_mode: no
|
||||
register: command_check_result
|
||||
ignore_errors: true
|
@ -1,115 +0,0 @@
|
||||
commit b10e9f539263e1a2fd9222d6c52c55c7cb337130
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
Date: Wed Oct 2 22:54:14 2019 +0200
|
||||
|
||||
- convert variables to bool when comparing in when: statements
|
||||
- always use ansible_hostname + ansible_domain instead of ansible_fqdn
|
||||
|
||||
diff --git a/tasks/sapnote/2002167/03-setting-the-hostname.yml b/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
index f4e57f8..21de429 100644
|
||||
--- a/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
+++ b/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
@@ -19,40 +19,40 @@
|
||||
failed_when: change_hostname.rc >= 2
|
||||
|
||||
- name: Check if ipv4 address, FQDN, and hostname are in /etc/hosts
|
||||
- command: bash -lc "awk 'BEGIN{a=0}/{{ ansible_default_ipv4.address }}/&&/{{ ansible_fqdn }}/&&/{{ ansible_hostname }}/{a++}END{print a}' /etc/hosts"
|
||||
+ command: bash -lc "awk 'BEGIN{a=0}/{{ ansible_default_ipv4.address }}/&&/{{ ansible_hostname }}.{{ ansible_domain }}/&&/{{ ansible_hostname }}/{a++}END{print a}' /etc/hosts"
|
||||
register: command_result
|
||||
changed_when: no
|
||||
- debug:
|
||||
var: command_result.stdout_lines, command_result.stderr_lines
|
||||
when:
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- debug:
|
||||
msg:
|
||||
- "Expected:"
|
||||
- - "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}"
|
||||
+ - "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}"
|
||||
when:
|
||||
- command_result.stdout != "1"
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- fail:
|
||||
msg:
|
||||
- "Server's ipv4 address, FQDN, or hostname are not in /etc/hosts!"
|
||||
when:
|
||||
- command_result.stdout != "1"
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- name: Make sure server's IP address is in /etc/hosts
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^{{ ansible_default_ipv4.address }}'
|
||||
insertbefore: '^127.0.0.1'
|
||||
-# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
- line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }} "
|
||||
+# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}"
|
||||
+ line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}"
|
||||
state: present
|
||||
when:
|
||||
- - sap_preconfigure_modify_etc_hosts
|
||||
+ - sap_preconfigure_modify_etc_hosts | bool
|
||||
- debug:
|
||||
- msg: "System {{ ansible_hostname }}, {{ ansible_fqdn }} has ipv4 address {{ ansible_default_ipv4.address }}"
|
||||
+ msg: "System {{ ansible_hostname }}, {{ ansible_hostname }}.{{ ansible_domain }} has ipv4 address {{ ansible_default_ipv4.address }}"
|
||||
|
||||
...
|
||||
diff --git a/tasks/sapnote/2772999/03-configure-hostname.yml b/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
index f89ca68..3de61a5 100644
|
||||
--- a/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
+++ b/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
@@ -19,40 +19,40 @@
|
||||
failed_when: change_hostname.rc >= 2
|
||||
|
||||
- name: Check if ipv4 address, FQDN, and hostname are in /etc/hosts
|
||||
- command: bash -lc "awk 'BEGIN{a=0}/{{ ansible_default_ipv4.address }}/&&/{{ ansible_fqdn }}/&&/{{ ansible_hostname }}/{a++}END{print a}' /etc/hosts"
|
||||
+ command: bash -lc "awk 'BEGIN{a=0}/{{ ansible_default_ipv4.address }}/&&/{{ ansible_hostname }}.{{ ansible_domain }}/&&/{{ ansible_hostname }}/{a++}END{print a}' /etc/hosts"
|
||||
register: command_result
|
||||
changed_when: no
|
||||
- debug:
|
||||
var: command_result.stdout_lines, command_result.stderr_lines
|
||||
when:
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- debug:
|
||||
msg:
|
||||
- "Expected:"
|
||||
- - "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}"
|
||||
+ - "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}"
|
||||
when:
|
||||
- command_result.stdout != "1"
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- fail:
|
||||
msg:
|
||||
- "Server's ipv4 address, FQDN, or hostname are not in /etc/hosts!"
|
||||
when:
|
||||
- command_result.stdout != "1"
|
||||
- - not sap_preconfigure_modify_etc_hosts
|
||||
+ - not sap_preconfigure_modify_etc_hosts | bool
|
||||
|
||||
- name: Make sure server's IP address is in /etc/hosts
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^{{ ansible_default_ipv4.address }}'
|
||||
insertbefore: '^127.0.0.1'
|
||||
-# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
- line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }} "
|
||||
+# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}"
|
||||
+ line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}"
|
||||
state: present
|
||||
when:
|
||||
- - sap_preconfigure_modify_etc_hosts
|
||||
+ - sap_preconfigure_modify_etc_hosts | bool
|
||||
- debug:
|
||||
- msg: "System {{ ansible_hostname }}, {{ ansible_fqdn }} has ipv4 address {{ ansible_default_ipv4.address }}"
|
||||
+ msg: "System {{ ansible_hostname }}, {{ ansible_hostname }}.{{ ansible_domain }} has ipv4 address {{ ansible_default_ipv4.address }}"
|
||||
|
||||
...
|
@ -1,34 +0,0 @@
|
||||
commit baa3b58a0d2a60bb0e222b3dac5190c8ea171cf3
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
Date: Tue Oct 1 18:40:03 2019 +0200
|
||||
|
||||
use {{ ansible_hostname }}.{{ ansible_domain }} instead of {{ ansible_fqdn }}
|
||||
|
||||
diff --git a/tasks/sapnote/2002167/03-setting-the-hostname.yml b/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
index e95fb74..f4e57f8 100644
|
||||
--- a/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
+++ b/tasks/sapnote/2002167/03-setting-the-hostname.yml
|
||||
@@ -47,7 +47,8 @@
|
||||
path: /etc/hosts
|
||||
regexp: '^{{ ansible_default_ipv4.address }}'
|
||||
insertbefore: '^127.0.0.1'
|
||||
- line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
+# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
+ line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }} "
|
||||
state: present
|
||||
when:
|
||||
- sap_preconfigure_modify_etc_hosts
|
||||
diff --git a/tasks/sapnote/2772999/03-configure-hostname.yml b/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
index 258c9f5..f89ca68 100644
|
||||
--- a/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
+++ b/tasks/sapnote/2772999/03-configure-hostname.yml
|
||||
@@ -47,7 +47,8 @@
|
||||
path: /etc/hosts
|
||||
regexp: '^{{ ansible_default_ipv4.address }}'
|
||||
insertbefore: '^127.0.0.1'
|
||||
- line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
+# line: "{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }} "
|
||||
+ line: "{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }} "
|
||||
state: present
|
||||
when:
|
||||
- sap_preconfigure_modify_etc_hosts
|
@ -0,0 +1,125 @@
|
||||
commit db645e39a38070ac0b3fe9f2f447d60e6eedac4a
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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
|
@ -0,0 +1,82 @@
|
||||
commit b056297b1e54662773d9b63850fdae34d2606fa1
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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 ) }}"
|
||||
+
|
||||
...
|
@ -0,0 +1,41 @@
|
||||
commit 6be65f40569044307bbf41038b766ff571a08025
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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"
|
@ -0,0 +1,34 @@
|
||||
commit 70cd0f9f8b0f7de3e48c1af041a0d63443445052
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
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
|
@ -1,26 +1,30 @@
|
||||
# avoiding version conflict, set version 1.1.1 for rhel8
|
||||
%define upstream_vesion 2019-09-30_18-11-12
|
||||
# avoiding version conflict, set version 2.0.0 for rhel8
|
||||
%define upstream_vesion 2020-06-08
|
||||
|
||||
Name: rhel-system-roles-sap
|
||||
Summary: System Role prepares a RHEL system for running SAP software for SAP HANA
|
||||
Version: 1.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
|
||||
Version: 2.0.0
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+
|
||||
Url: https://github.com/berndfinger
|
||||
Source0: https://than.fedorapeople.org/rhel/%{name}-%{upstream_vesion}.tar.gz
|
||||
|
||||
# set sap_hana_preconfigure_min_packages_7.8 for rhel-7.8
|
||||
Patch0: rhel-system-roles-sap-0.7.2-rhel-7.8.patch
|
||||
|
||||
# use {{ ansible_hostname }}.{{ ansible_domain }} instead of {{ ansible_fqdn }}
|
||||
Patch1: sap-preconfig-baa3b58a0d2a60bb0e222b3dac5190c8ea171cf3.patch
|
||||
|
||||
# convert variables to bool when comparing in when: statements
|
||||
# always use ansible_hostname + ansible_domain instead of ansible_fqdn
|
||||
Patch2: sap-preconfig-b10e9f539263e1a2fd9222d6c52c55c7cb337130.patch
|
||||
|
||||
# set LC_ALL=C
|
||||
Patch3: sap-hana-preconfigure-38a18c2890aa80c4562d002cc557945bdf9c5e7e.patch
|
||||
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
|
||||
Patch0: sap-hana-preconfigure-2.0.0.patch
|
||||
# for fixes for #78, #79, #81, #82, #94-#97, #99, #101-#102
|
||||
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-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch
|
||||
Patch7: sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch
|
||||
Patch8: sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch
|
||||
Patch9: sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch
|
||||
|
||||
BuildArch: noarch
|
||||
Requires: uuidd
|
||||
@ -30,15 +34,38 @@ Collection of Ansible roles which configures a RHEL system according
|
||||
to applicable SAP notes so that any SAP software can be installed.
|
||||
|
||||
%prep
|
||||
%setup -q -T -c -n %{name}-%{version} -a 0
|
||||
%setup -q -T -c -n %{name}-%{version} -a 0 -a 1 -a 2
|
||||
pushd sap-hana-preconfigure
|
||||
%patch0 -p1
|
||||
pushd sap-preconfigure
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
popd
|
||||
pushd sap-hana-preconfigure
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
popd
|
||||
pushd sap-preconfigure
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
popd
|
||||
|
||||
# remove all SLES stuff
|
||||
rm -r sap-hana-preconfigure/tasks/SLES
|
||||
rm -r sap-hana-preconfigure/tasks/SLES15
|
||||
rm -r sap-hana-preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc
|
||||
rm -r sap-hana-preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines
|
||||
rm -r sap-hana-preconfigure/tasks/sapnote/2578899 # SLES 15 - installation
|
||||
rm -r sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA
|
||||
rm sap-hana-preconfigure/vars/SLES_15.yml
|
||||
|
||||
# remove all RHEL 6 stuff
|
||||
rm sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings
|
||||
rm sap-hana-preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings
|
||||
rm sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings
|
||||
rm sap-hana-preconfigure/vars/RedHat_6.5.yml
|
||||
rm sap-hana-preconfigure/vars/RedHat_6.6.yml
|
||||
rm sap-hana-preconfigure/vars/RedHat_6.7.yml
|
||||
|
||||
%build
|
||||
|
||||
@ -68,6 +95,15 @@ cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir
|
||||
%{_datadir}/ansible/roles/*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 29 2020 Than Ngo <than@redhat.com> - 2.0.0-2
|
||||
- Related: #1844190, more fixes for #78, #79, #81, #82, #94-#97, #99, #101-#102
|
||||
|
||||
* Mon Jun 08 2020 Than Ngo <than@redhat.com> - 2.0.0-1
|
||||
- Resolves: #1844190, rebase to 2.0.0
|
||||
|
||||
* Thu May 07 2020 Than Ngo <than@redhat.com> - 1.1.1-2
|
||||
- Resolves: #1829495, fix summary
|
||||
|
||||
* Mon Oct 21 2019 Than Ngo <than@redhat.com> - 1.1.1-1
|
||||
- rebase to 1.1.1
|
||||
- always use ansible_hostname + ansible_domain instead of ansible_fqdn
|
||||
|
Loading…
Reference in New Issue
Block a user