import rhel-system-roles-sap-3.0.1-4.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:55:22 -04:00 committed by root
parent 2d13abd490
commit 664a6ec639
36 changed files with 463 additions and 2366 deletions

View File

@ -1,3 +1,3 @@
9ecaedd62786d616eb51fc09893537ebd8ff7e4f SOURCES/sap-hana-preconfigure.tar.gz
435e268e5adf767c382df673b6ee4bac7ddc55a8 SOURCES/sap-netweaver-preconfigure.tar.gz
8d8de726e02ee97fe2346938c22d891ea31efa2d SOURCES/sap-preconfigure.tar.gz
2a6d0af7d9ee7fdd8501e52476f9b42c54e3a50c SOURCES/sap-hana-preconfigure.tar.gz
65265d647f2e65227aa54e5173ef8c29b11d6764 SOURCES/sap-netweaver-preconfigure.tar.gz
2b1fd31c00102824db00626a95f3f64dc5813983 SOURCES/sap-preconfigure.tar.gz

View File

@ -1,19 +0,0 @@
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

View File

@ -1,213 +0,0 @@
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:

View File

@ -1,54 +0,0 @@
commit 6d65f9b667a8a7dec17caa70c5df929b921691a6
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,99 +0,0 @@
commit 6f8d7c964e2c95b37c68299e6077bc3f987faffb
Author: root <root@lu0530v6.wdf.sap.corp>
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
-

View File

@ -1,105 +0,0 @@
commit 89202367321b47c3fb5d52e50f5ea220c548fab5
Author: Bernd Finger <bfinger@redhat.com>
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' ]

View File

@ -1,116 +0,0 @@
commit 03affb58325bf1c370ea3e0d76e291eb9485acf1
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,47 +0,0 @@
commit 6edb1339a1a79c9e47f8023534e0a3db429dbf20
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,30 +0,0 @@
commit d26152ada59c5e2919be3f7cf89927ac7bfd510d
Author: Bernd Finger <bfinger@redhat.com>
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' }}"
...

View File

@ -1,19 +0,0 @@
commit 896c956aab61a0ab94ca1e36c9d8693b4b6c2a5a
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,50 +0,0 @@
commit 1442c5470eae0769a6ceee201621aab0518bb6f3
Author: Bernd Finger <bfinger@redhat.com>
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"
...

View File

@ -1,370 +0,0 @@
commit f011979fa05e938165c95a134bbdcc37a33f4eea
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,61 +0,0 @@
commit 752f988bf105a325db12965d240bbe1462b72c78
Author: Bernd Finger <bfinger@redhat.com>
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:

View File

@ -1,18 +0,0 @@
commit 75a1940d0230c0fb2957426952c5308e08919c06
Author: Bernd Finger <bfinger@redhat.com>
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)

View File

@ -1,234 +0,0 @@
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:

View File

@ -1,85 +0,0 @@
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:

View File

@ -1,41 +0,0 @@
commit 6a417012022f38534ae5a5803062639446c9fa81
Author: Bernd Finger <bfinger@redhat.com>
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"

View File

@ -1,37 +0,0 @@
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

View File

@ -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
##################################################################

View File

@ -0,0 +1,28 @@
commit 29003efa866e8f691076023ccf2eede2032173d6
Author: Bernd Finger <bfinger@redhat.com>
Date: Thu Mar 4 13:10:01 2021 +0100
added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md
diff --git a/README.md b/README.md
index 74ca820..50359b5 100644
--- a/README.md
+++ b/README.md
@@ -245,6 +245,17 @@ sap_hana_preconfigure_kernel_parameters:
- { name: net.ipv4.tcp_slow_start_after_idle, value: 0 }
```
+### HANA kernel parameters for IBM POWER servers
+[SAP Note 2055470](https://launchpad.support.sap.com/#/notes/2055470) contains links to IBM documents for SAP HANA on POWER.
+Among these is a document document which contains certain recommended Linux kernel settings for SAP HANA on POWER:
+Network_Configuration_for_HANA_Workloads_on_IBM_Power_Servers_V7.1.pdf.
+This document is linked from SAP note 2055470 via "SAP HANA on IBM Power Systems and IBM System Storage - Guides", then via
+"SAP on Linux and IBM Storage Guides (incl. HANA)", and then then via
+"SAP on Power Linux Network and Fibre Channel Guides".
+The default parameter recommendations are also defined in ./vars/{{ansible_os_release}}.yml. If you need to add or change parameters
+for your system, copy these parameters from the vars file into the variable sap_hana_preconfigure_kernel_parameters_ppc64le and
+add or change your settings, similar to the previous example.
+
Example Playbook
----------------

View File

@ -0,0 +1,93 @@
commit 3714dbb80889e65fb7152456fe262ab1fcc5e3e5
Author: Bernd Finger <bfinger@redhat.com>
Date: Thu Mar 4 10:31:24 2021 +0100
fix issue #170
diff --git a/defaults/main.yml b/defaults/main.yml
index b63c14b..02768cc 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -92,6 +92,8 @@ sap_hana_preconfigure_fail_if_reboot_required: yes
sap_hana_preconfigure_kernel_parameters: "{{ __sap_hana_preconfigure_kernel_parameters_default }}"
+sap_hana_preconfigure_kernel_parameters_ppc64le: "{{ __sap_hana_preconfigure_kernel_parameters_default_ppc64le }}"
+
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'
diff --git a/tasks/sapnote/2055470.yml b/tasks/sapnote/2055470.yml
index b958e52..2f41057 100644
--- a/tasks/sapnote/2055470.yml
+++ b/tasks/sapnote/2055470.yml
@@ -37,7 +37,7 @@
loop_control:
loop_var: line_item
-- name: add largesend parameter
+- name: Add largesend parameters for ppc64le
sysctl:
sysctl_file: /etc/sysctl.d/ibm_largesend.conf
name: "{{ line_item.name }}"
@@ -45,12 +45,7 @@
state: present
sysctl_set: yes
reload: yes
- with_items:
- - { name: net.core.rmem_max, value: 56623104 }
- - { name: net.core.wmem_max, value: 56623104 }
- - { name: net.ipv4.tcp_rmem, value: "65536 262088 56623104" }
- - { name: net.ipv4.tcp_wmem, value: "65536 262088 56623104" }
- - { name: net.ipv4.tcp_mem, value: "56623104 56623104 56623104" }
+ with_items: "{{ sap_hana_preconfigure_kernel_parameters_ppc64le }}"
loop_control:
loop_var: line_item
diff --git a/tasks/sapnote/assert-2055470.yml b/tasks/sapnote/assert-2055470.yml
index 2aaa697..3a87e05 100644
--- a/tasks/sapnote/assert-2055470.yml
+++ b/tasks/sapnote/assert-2055470.yml
@@ -74,7 +74,7 @@
- name: Get and assert kernel tunables for ppc64le
include_tasks: ../RedHat/generic/sapnote-2055470-loop-block.yml
- loop: "{{ __sap_hana_preconfigure_kernel_parameters_default_ppc64le }}"
+ loop: "{{ sap_hana_preconfigure_kernel_parameters_ppc64le }}"
loop_control:
loop_var: line_item
when:
diff --git a/vars/RedHat_7.yml b/vars/RedHat_7.yml
index 585f304..9dc0d83 100644
--- a/vars/RedHat_7.yml
+++ b/vars/RedHat_7.yml
@@ -207,4 +207,12 @@ __sap_hana_preconfigure_kernel_parameters_default:
# So we do not change the default.
# - { name: net.ipv4.tcp_syn_retries, value: 8 }
+# Network related kernel parameters for ppc64le:
+__sap_hana_preconfigure_kernel_parameters_default_ppc64le:
+ - { name: net.core.rmem_max, value: 56623104 }
+ - { name: net.core.wmem_max, value: 56623104 }
+ - { name: net.ipv4.tcp_rmem, value: "65536 262088 56623104" }
+ - { name: net.ipv4.tcp_wmem, value: "65536 262088 56623104" }
+ - { name: net.ipv4.tcp_mem, value: "56623104 56623104 56623104" }
+
...
diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml
index 2109126..843c034 100644
--- a/vars/RedHat_8.yml
+++ b/vars/RedHat_8.yml
@@ -205,4 +205,12 @@ __sap_hana_preconfigure_kernel_parameters_default:
# So we do not change the default.
# - { name: net.ipv4.tcp_syn_retries, value: 8 }
+# Network related kernel parameters for ppc64le:
+__sap_hana_preconfigure_kernel_parameters_default_ppc64le:
+ - { name: net.core.rmem_max, value: 56623104 }
+ - { name: net.core.wmem_max, value: 56623104 }
+ - { name: net.ipv4.tcp_rmem, value: "65536 262088 56623104" }
+ - { name: net.ipv4.tcp_wmem, value: "65536 262088 56623104" }
+ - { name: net.ipv4.tcp_mem, value: "56623104 56623104 56623104" }
+
...

View File

@ -0,0 +1,26 @@
commit 4d55594e2e1cba77a095f146b7498e00949f9678
Author: Bernd Finger <bfinger@redhat.com>
Date: Thu Mar 4 14:35:06 2021 +0100
typos in README.md
diff --git a/README.md b/README.md
index 50359b5..3f251d5 100644
--- a/README.md
+++ b/README.md
@@ -247,12 +247,12 @@ sap_hana_preconfigure_kernel_parameters:
### HANA kernel parameters for IBM POWER servers
[SAP Note 2055470](https://launchpad.support.sap.com/#/notes/2055470) contains links to IBM documents for SAP HANA on POWER.
-Among these is a document document which contains certain recommended Linux kernel settings for SAP HANA on POWER:
+Among these is a document which contains certain recommended Linux kernel settings for SAP HANA on POWER:
Network_Configuration_for_HANA_Workloads_on_IBM_Power_Servers_V7.1.pdf.
This document is linked from SAP note 2055470 via "SAP HANA on IBM Power Systems and IBM System Storage - Guides", then via
-"SAP on Linux and IBM Storage Guides (incl. HANA)", and then then via
+"SAP on Linux and IBM Storage Guides (incl. HANA)", and then via
"SAP on Power Linux Network and Fibre Channel Guides".
-The default parameter recommendations are also defined in ./vars/{{ansible_os_release}}.yml. If you need to add or change parameters
+The default parameter recommendations are defined in ./vars/{{ansible_os_release}}.yml. If you need to add or change parameters
for your system, copy these parameters from the vars file into the variable sap_hana_preconfigure_kernel_parameters_ppc64le and
add or change your settings, similar to the previous example.

View File

@ -0,0 +1,197 @@
commit 7ffd72dcbb8cda6e9b12d9d9f23a20866b143d02
Author: Bernd Finger <bfinger@redhat.com>
Date: Tue Feb 23 18:52:16 2021 +0100
fix issues #163 and #164
diff --git a/README.md b/README.md
index b6f6232..74ca820 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,7 @@ Do not run this role against an SAP HANA or other production system. The role wi
Changes
-------
-The previous version of this role used variable sap_hana_preconfigure_use_tuned_where_possible to switch between either tuned settings or kernel command line settings (where applicable).
+1) Previous versions of this role used variable sap_hana_preconfigure_use_tuned_where_possible to switch between either tuned settings or kernel command line settings (where applicable).
The current version modifies this behavior:
- The variable sap_hana_preconfigure_use_tuned_where_possible has been renamed to sap_hana_preconfigure_use_tuned
- The variable sap_hana_preconfigure_switch_to_tuned_profile_sap_hana has been removed.
@@ -70,6 +70,12 @@ The current version modifies this behavior:
If sap_hana_preconfigure_use_tuned is set to `no`, the role will perform a static configuration, including the modification of the linux command line in grub.
- The role can use tuned, or configure the kernel command line, or both.
+2) Previous versions of this role used variable sap_hana_preconfigure_selinux_state to set the SELinux state to disabled, which is mentioned in
+SAP notes 2292690 (RHEL 7) and 2777782 (RHEL 8). As role sap-preconfigure already allows to specify the desired SELinux state, and as
+sap-preconfigure is run before sap-hana-preconfigure, there is no need any more to let sap-hana-preconfigure configure the SELinux state.
+Same applies to the assertion of the SELinux state. Because of this, variable sap_hana_preconfigure_selinux_state has been removed from this role and
+tasks 2292690/08-disable-selinux.yml and 2777782/01-assert-selinux.yml have been commented out.
+
Role Variables
--------------
@@ -91,8 +97,8 @@ sap_hana_preconfigure_configuration
### Define configuration steps of SAP notes
For defining one or more configuration steps of SAP notes to be executed or checked only, set variable `sap_hana_preconfigure_config_all` to `no`, `sap_hana_preconfigure_configuration` to `yes`, and one or more of the following variables to `yes`:
```yaml
-sap_hana_preconfigure_2777782_[01...10], example: sap_hana_preconfigure_2777782_05
-sap_hana_preconfigure_2292690_[01...10], example: sap_hana_preconfigure_2292690_02
+sap_hana_preconfigure_2777782_[02...10], example: sap_hana_preconfigure_2777782_05
+sap_hana_preconfigure_2292690_[01...07,09,10], example: sap_hana_preconfigure_2292690_02
sap_hana_preconfigure_2009879_3_9
sap_hana_preconfigure_2009879_3_14_[1...4]
sap_hana_preconfigure_2009879_3_15
@@ -156,6 +162,19 @@ If you want the role to set the RHEL release to a certain fixed minor release (a
sap_hana_preconfigure_set_minor_release
```
+### Minimum package check
+The following variable will make sure packages are installed at minimum required versions as defined in files `vars/*.yml`. Default is `yes`.
+```yaml
+sap_hana_preconfigure_min_package_check
+```
+
+### Perform a yum update
+If the following variable is set to `yes`, the role will run a `yum update` before performing configuration changes. Default is `no`. \
+*Note*: The outcome of a `yum update` depends on the managed node's configuration for sticky OS minor version, see the description of the release option in `man subscription-manager`. For SAP HANA installations, setting a certain minor version with `subscscription-manager release --set=X.Y` is a strict requirement.
+```yaml
+sap_hana_preconfigure_update
+```
+
### 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
@@ -183,12 +202,6 @@ By setting the variable to `no`, the role will not fail if a reboot is required
sap_hana_preconfigure_fail_if_reboot_required
```
-### Define SELinux state
-The following variable allows for defining the desired SELinux state. Default is `disabled`.
-```yaml
-sap_hana_preconfigure_selinux_state
-```
-
### Use tuned profile sap-hana
By default, the role will activate tuned profile `sap-hana` for configuring kernel parameters (where possible). If you do not want to use the tuned profile sap-hana,
set the following variable to `no`. In this case, the role will also modify GRUB_CMDLINE_LINUX, no matter how variable `sap_hana_preconfigure_modify_grub_cmdline_linux` (see below) is set.
@@ -227,7 +240,7 @@ into the variable sap_hana_preconfigure_kernel_parameters and add or change your
```yaml
sap_hana_preconfigure_kernel_parameters:
- { name: net.core.somaxconn, value: 4096 }
- - { name: net.ipv4.tcp_max_syn_backlog, value: 8192}
+ - { name: net.ipv4.tcp_max_syn_backlog, value: 8192 }
- { name: net.ipv4.tcp_timestamps, value: 1 }
- { name: net.ipv4.tcp_slow_start_after_idle, value: 0 }
```
diff --git a/defaults/main.yml b/defaults/main.yml
index 50d8e14..b63c14b 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -24,7 +24,6 @@
## examples for RHEL8:
#sap_hana_preconfigure_2777782_03: yes
#sap_hana_preconfigure_2777782_10: yes
-#sap_hana_preconfigure_2772999_09: yes
## both:
#sap_hana_preconfigure_2382421: yes
@@ -107,7 +106,8 @@ sap_hana_preconfigure_ppcle_mtu9000_if: ''
## defaults to all interfaces
sap_hana_preconfigure_ppcle_tso_if: "{{ ansible_interfaces| difference(['lo']) }}"
-sap_hana_preconfigure_selinux_state: "{{ __sap_hana_preconfigure_selinux_state }}"
+# SELinux is already configured in role sap-preconfigure:
+#sap_hana_preconfigure_selinux_state: "{{ __sap_hana_preconfigure_selinux_state }}"
sap_hana_preconfigure_use_tuned: yes
diff --git a/tasks/RedHat/assert-installation.yml b/tasks/RedHat/assert-installation.yml
index eda7d22..55346b9 100644
--- a/tasks/RedHat/assert-installation.yml
+++ b/tasks/RedHat/assert-installation.yml
@@ -169,7 +169,7 @@
args:
warn: false
changed_when: false
- ignore_errors: "{{ sap_hana_preconfigure_ignore_errors|d(false) }}"
+ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}"
when: sap_hana_preconfigure_update
- name: Assert that there are no more possible package updates
diff --git a/tasks/sapnote/2292690.yml b/tasks/sapnote/2292690.yml
index 8b4c95c..3137f22 100644
--- a/tasks/sapnote/2292690.yml
+++ b/tasks/sapnote/2292690.yml
@@ -22,7 +22,7 @@
- import_tasks: 2292690/07-disable-ksm.yml
when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_07|d(false)
-# We can skip the following task as it is already part of role sap-preconfigure:
+# SELinux is already configured in role sap-preconfigure:
#- import_tasks: 2292690/08-disable-selinux.yml
# when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_08|d(false)
diff --git a/tasks/sapnote/2777782.yml b/tasks/sapnote/2777782.yml
index ec4677f..8c904bb 100644
--- a/tasks/sapnote/2777782.yml
+++ b/tasks/sapnote/2777782.yml
@@ -1,8 +1,9 @@
---
# tasks file for sap-hana-preconfigure configuration
-- import_tasks: 2777782/01-disable-selinux.yml
- when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false)
+# SELinux is already configured in role sap-preconfigure:
+#- import_tasks: 2777782/01-disable-selinux.yml
+# when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false)
- import_tasks: 2777782/02-configure-tuned.yml
when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_02|d(false)
diff --git a/tasks/sapnote/assert-2292690.yml b/tasks/sapnote/assert-2292690.yml
index 588f6c8..b9a5cf2 100644
--- a/tasks/sapnote/assert-2292690.yml
+++ b/tasks/sapnote/assert-2292690.yml
@@ -25,9 +25,9 @@
- import_tasks: 2292690/07-assert-ksm.yml
when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_07|d(false)
-# The following task is already part of role sap-preconfigure:
-- import_tasks: 2292690/08-assert-selinux.yml
- when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_08|d(false)
+# SELinux is already configured in role sap-preconfigure:
+#- import_tasks: 2292690/08-assert-selinux.yml
+# when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_08|d(false)
- import_tasks: 2292690/09-assert-etc-sudoers.yml
when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_09|d(false)
diff --git a/tasks/sapnote/assert-2777782.yml b/tasks/sapnote/assert-2777782.yml
index e226e00..995960a 100644
--- a/tasks/sapnote/assert-2777782.yml
+++ b/tasks/sapnote/assert-2777782.yml
@@ -4,9 +4,9 @@
- debug:
msg: "sapnote/assert-2777782.yml"
-# The following task is already part of role sap-preconfigure:
-- import_tasks: 2777782/01-assert-selinux.yml
- when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false)
+# SELinux is already configured in role sap-preconfigure:
+#- import_tasks: 2777782/01-assert-selinux.yml
+# when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false)
- import_tasks: 2777782/02-assert-tuned.yml
when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_02|d(false)
diff --git a/vars/main.yml b/vars/main.yml
index 183f4a1..490b0fc 100644
--- a/vars/main.yml
+++ b/vars/main.yml
@@ -7,7 +7,8 @@
# Default parameter file for SYSCTL settings according to SAP NOTE 2382421
__sap_hana_preconfigure_etc_sysctl_saphana_conf: /etc/sysctl.d/sap_hana.conf
-__sap_hana_preconfigure_selinux_state: disabled
+# SELinux is already configured in role sap-preconfigure:
+#__sap_hana_preconfigure_selinux_state: disabled
__sap_hana_preconfigure_run_grub2_mkconfig: yes

View File

@ -1,125 +0,0 @@
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

View File

@ -1,82 +0,0 @@
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 ) }}"
+
...

View File

@ -1,41 +0,0 @@
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"

View File

@ -1,34 +0,0 @@
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

View File

@ -1,42 +0,0 @@
commit 77e02082ae0784f88eab8f9d0f764c3981b9cf6d
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,43 +0,0 @@
commit 840cafb7487687369d3597e6f9e21895da702094
Author: Bernd Finger <bfinger@redhat.com>
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:

View File

@ -1,110 +0,0 @@
commit 110d870eaac2efee2e131babacebc5337a15b3e3
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -1,41 +0,0 @@
commit 7595b96fbd6a7360d62413734bc652ed4c5e2771
Author: Bernd Finger <bfinger@redhat.com>
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"

View File

@ -1,53 +0,0 @@
commit 3f3c93eaddfafd08132017058b0b330108d2bd2c
Author: Bernd Finger <bfinger@redhat.com>
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' ]
...

View File

@ -1,41 +0,0 @@
commit db1ed07c66286edbee756ed3504649975d333306
Author: Bernd Finger <bfinger@redhat.com>
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

View File

@ -0,0 +1,24 @@
commit 2bc922671e92c12d3954c249c51d4281e12d1274
Author: Bernd Finger <bfinger@redhat.com>
Date: Thu Mar 4 22:37:21 2021 +0100
solve issue #130
diff --git a/tasks/assert-installation.yml b/tasks/assert-installation.yml
index ae8c144..74a0378 100644
--- a/tasks/assert-installation.yml
+++ b/tasks/assert-installation.yml
@@ -16,10 +16,9 @@
- name: Assert that all required RHEL 7 package groups are installed
assert:
- that:
- - "'{{ line_item|replace(\'@\', \'\') }}' in yum_group_result.stdout_lines"
- fail_msg: "FAIL: Package group '{{ line_item|replace(\'@\', \'\') }}' is not installed!"
- success_msg: "PASS: Package group '{{ line_item|replace(\'@\', \'\') }}' is installed."
+ that: "'{{ line_item|replace(\"@\", \"\") }}' in yum_group_result.stdout_lines"
+ fail_msg: "FAIL: Package group '{{ line_item|replace(\"@\", \"\") }}' is not installed!"
+ success_msg: "PASS: Package group '{{ line_item|replace(\"@\", \"\") }}' is installed."
with_items:
- "{{ __sap_preconfigure_packagegroups }}"
loop_control:

View File

@ -0,0 +1,49 @@
commit 6169bd8d447ce60012f7fd8a3d664a1bae2b3c0a
Author: Bernd Finger <bfinger@redhat.com>
Date: Tue Feb 23 18:56:13 2021 +0100
fix issue #125
diff --git a/tasks/RedHat/generic/assert-etc-hosts.yml b/tasks/RedHat/generic/assert-etc-hosts.yml
index 3304d73..b8d8830 100644
--- a/tasks/RedHat/generic/assert-etc-hosts.yml
+++ b/tasks/RedHat/generic/assert-etc-hosts.yml
@@ -54,8 +54,10 @@
success_msg: "PASS: There is only one line containing '{{ sap_ip }}' in /etc/hosts."
ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(false) }}"
-- name: Check for duplicate entries of {{ sap_hostname }}.{{ sap_domain }} in /etc/hosts
- command: awk 'BEGIN{a=0}/{{ sap_hostname }}.{{ sap_domain }}/{a++}END{print a}' /etc/hosts
+- name: Check for duplicate or missing entries of {{ sap_hostname }}.{{ sap_domain }} in /etc/hosts
+ command: awk '/^{{ sap_hostname }}.{{ sap_domain }} /||
+ / {{ sap_hostname }}.{{ sap_domain }} /||
+ / {{ sap_hostname }}.{{ sap_domain }}$/{a++}END{print a}' /etc/hosts
register: __shell_03_result
ignore_errors: yes
changed_when: no
@@ -67,8 +69,10 @@
success_msg: "PASS: There is only one line containing '{{ sap_hostname }}.{{ sap_domain }}' in /etc/hosts."
ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(false) }}"
-- name: Check for duplicate entries of {{ sap_hostname }} in /etc/hosts
- command: awk 'BEGIN{a=0}/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
+- name: Check for duplicate or missing entries of {{ sap_hostname }} in /etc/hosts
+ command: awk '/^{{ sap_hostname }} /||
+ / {{ sap_hostname }} /||
+ / {{ sap_hostname }}$/{a++}END{print a}' /etc/hosts
register: __shell_04_result
ignore_errors: yes
changed_when: no
diff --git a/tasks/RedHat/generic/configure-etc-hosts.yml b/tasks/RedHat/generic/configure-etc-hosts.yml
index 2ae3a18..0a1ec59 100644
--- a/tasks/RedHat/generic/configure-etc-hosts.yml
+++ b/tasks/RedHat/generic/configure-etc-hosts.yml
@@ -97,7 +97,7 @@
- name: Check for duplicate or missing entries of hostname and fqdn in /etc/hosts
shell: |
- n=$(grep -w "{{ line_item }}" /etc/hosts | wc -l)
+ n=$(awk '/^{{ line_item }} /||/ {{ line_item }} /||/ {{ line_item }}$/{a++}END{print a}' /etc/hosts)
if [ $n -eq 1 ]; then
exit 0
else

View File

@ -1,50 +1,21 @@
# avoiding version conflict, set version 2.0.0 for rhel8
%define upstream_vesion 2020-06-08
Name: rhel-system-roles-sap
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 2.0.0
Release: 7%{?dist}
Version: 3.0.1
Release: 4%{?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/berndfinger/sap-preconfigure/releases/download/3.0.1/sap-preconfigure.tar.gz
Source1: https://github.com/berndfinger/sap-hana-preconfigure/releases/download/3.0.1/sap-hana-preconfigure.tar.gz
Source2: https://github.com/berndfinger/sap-netweaver-preconfigure/releases/download/3.0.1/sap-netweaver-preconfigure.tar.gz
# patches 0-49 for sap-preconfigure
Patch0: sap-preconfigure-6169bd8d447ce60012f7fd8a3d664a1bae2b3c0a.patch
Patch1: sap-preconfigure-2bc922671e92c12d3954c249c51d4281e12d1274.patch
# patches 50-99 for sap-hana-preconfigure
Patch50: sap-hana-preconfigure-7ffd72dcbb8cda6e9b12d9d9f23a20866b143d02.patch
Patch51: sap-hana-preconfigure-3714dbb80889e65fb7152456fe262ab1fcc5e3e5.patch
Patch52: sap-hana-preconfigure-29003efa866e8f691076023ccf2eede2032173d6.patch
Patch53: sap-hana-preconfigure-4d55594e2e1cba77a095f146b7498e00949f9678.patch
# patches 100-149 for sap-netweaver-preconfigur
BuildArch: noarch
Requires: uuidd
@ -55,37 +26,15 @@ to applicable SAP notes so that any SAP software can be installed.
%prep
%setup -q -T -c -n %{name}-%{version} -a 0 -a 1 -a 2
pushd sap-hana-preconfigure
pushd sap-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
pushd sap-hana-preconfigure
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
popd
# remove all SLES stuff
@ -133,6 +82,29 @@ cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir
%{_datadir}/ansible/roles/*
%changelog
* Fri Mar 05 2021 Than Ngo <than@redhat.com> - 3.0.1-4
- fixed issue #130 in sap-preconfigure
- fixed typos in README.md in sap_hana_preconfigure
- added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md
- fixed issue #170 in sap_hana_preconfigure
Related: #1891642
* Wed Feb 24 2021 Than Ngo <than@redhat.com> - 3.0.1-3
- Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-2
- Related: #1891642, update sap-hana-preconfigure 3.0.1 and fixed Urls
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-1
- Related: #1891642, rebase to 3.0.1
* Mon Feb 15 2021 Than Ngo <than@redhat.com> - 3.0.0-2
- Related: #1891642, more fixes #145, #148, #149, #150 #147
* Thu Jan 28 2021 Than Ngo <than@redhat.com> - 3.0.0-1
- Resolves: #1891638, bug fixes
- Resolves: #1891642, new features
* Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7
- Related: #1867027, fix #119