Compare commits

..

8 Commits

Author SHA1 Message Date
e42e9b65e0 import CS rhel-system-roles-sap-3.6.0-2.el8 2024-05-22 10:47:24 +00:00
CentOS Sources
0a5c177313 import rhel-system-roles-sap-3.4.0-3.el8 2023-05-16 06:03:32 +00:00
CentOS Sources
8f3a135998 import rhel-system-roles-sap-3.3.0-3.el8 2022-11-08 15:00:37 +00:00
CentOS Sources
ab2ac1a567 import rhel-system-roles-sap-3.2.0-2.el8_6 2022-06-29 03:29:56 +00:00
CentOS Sources
a23c0909ca import rhel-system-roles-sap-3.1.1-10.el8 2022-05-10 11:46:33 +00:00
CentOS Sources
b74d0c40a7 import rhel-system-roles-sap-3.1.1-9.el8_5 2022-02-04 16:36:47 +00:00
CentOS Sources
1b097d4e50 import rhel-system-roles-sap-3.1.1-6.el8 2021-12-16 13:44:37 +03:00
CentOS Sources
664a6ec639 import rhel-system-roles-sap-3.0.1-4.el8 2021-12-16 13:41:20 +03:00
34 changed files with 39740 additions and 2404 deletions

5
.gitignore vendored
View File

@ -1,3 +1,2 @@
SOURCES/sap-hana-preconfigure.tar.gz SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
SOURCES/sap-netweaver-preconfigure.tar.gz SOURCES/redhat.sap_install-1.3.5.tar.gz
SOURCES/sap-preconfigure.tar.gz

View File

@ -1,3 +1,2 @@
9ecaedd62786d616eb51fc09893537ebd8ff7e4f SOURCES/sap-hana-preconfigure.tar.gz 584f8d1681adf13cb7af256a7b38d94ca80dcab2 SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
435e268e5adf767c382df673b6ee4bac7ddc55a8 SOURCES/sap-netweaver-preconfigure.tar.gz 835376d0e4799989e9d4deb21ac7e1d335c941de SOURCES/redhat.sap_install-1.3.5.tar.gz
8d8de726e02ee97fe2346938c22d891ea31efa2d SOURCES/sap-preconfigure.tar.gz

File diff suppressed because it is too large Load Diff

View File

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

View File

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

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

@ -1,138 +1,365 @@
# avoiding version conflict, set version 2.0.0 for rhel8 # disable collection_artifact by default
%define upstream_vesion 2020-06-08 %bcond_with collection_artifact
Name: rhel-system-roles-sap # disable collection by default since version 3.6.0 (1.3.4)
%bcond_with collection
%if 0%{?fedora} || 0%{?rhel} > 8
%bcond_without html
%else
# pandoc is not supported in rhel 7 and older,
# which is needed for converting .md to .html.
%bcond_with html
%endif
%global collection_name sap_install
%if 0%{?rhel}
%define package_name rhel-system-roles-sap
%global collection_namespace redhat
%else
%define package_name linux-system-roles-sap
%global collection_namespace community
%endif
# collection_version has to be increased by every rebuild
# otherwise, it cannot be uploaded to Automation Hub and Galaxy
# due to version conflict
%define collection_version 1.3.5
%global mainid e2a233f5a0cb68363798bf014b16552cca681bd0
%global commit_id_sap_install %{collection_version}
%global rolename1 sap_general_preconfigure
%global rolename2 sap_ha_install_hana_hsr
%global rolename3 sap_hana_install
%global rolename4 sap_hana_preconfigure
%global rolename5 sap_ha_pacemaker_cluster
%global rolename6 sap_hypervisor_node_preconfigure
%global rolename7 sap_netweaver_preconfigure
%global rolename8 sap_swpm
%global rolename9 sap_vm_preconfigure
%global src_owner linux-system-roles
%global github_repo_sap_install redhat.sap_install
%global rolename_rhel %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename6} %{rolename7} %{rolename8} %{rolename9}
%global rolenames %{rolename_rhel}
Name: %{package_name}
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 2.0.0 Version: 3.6.0
Release: 7%{?dist} Release: 2%{?dist}
License: GPLv3+ License: GPL-3.0-or-later
Url: https://github.com/berndfinger Url: https://github.com/redhat-sap/community.sap_install
Source0: https://github.com/berndfinger/sap-preconfigure/releases/download/2.0.0/sap-preconfigure.tar.gz Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
Source1: https://github.com/berndfinger/sap-hana-preconfigure/releases/download/2.0.0/sap-hana-preconfigure.tar.gz Source1: https://github.com/redhat-sap/redhat.sap_install/archive/%{commit_id_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.tar.gz
Source2: https://github.com/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 # add collection files
Patch100: sap-preconfigure-#78-db645e39a38070ac0b3fe9f2f447d60e6eedac4a.patch Patch1: redhat.sap_install-1.3.5-collections-files-324bfb8bab50d2baa1c4aacdb59e4e5c9e2ba74f.patch
Patch101: sap-preconfigure-#79-b056297b1e54662773d9b63850fdae34d2606fa1.patch
Patch102: sap-preconfigure-#81-6be65f40569044307bbf41038b766ff571a08025.patch # add tests files
Patch103: sap-preconfigure-#82-70cd0f9f8b0f7de3e48c1af041a0d63443445052.patch Patch2: redhat.sap_install-1.3.4-add_tests.patch
Patch104: sap-preconfigure-#84-77e02082ae0784f88eab8f9d0f764c3981b9cf6d.patch
Patch105: sap-preconfigure-#85-#86-840cafb7487687369d3597e6f9e21895da702094.patch # add tools files
Patch106: sap-preconfigure-#85-110d870eaac2efee2e131babacebc5337a15b3e3.patch Patch3: redhat.sap_install-1.3.4-add_tools.patch
Patch107: sap-preconfigure-#88-7595b96fbd6a7360d62413734bc652ed4c5e2771.patch
Patch108: sap-preconfigure-#89-3f3c93eaddfafd08132017058b0b330108d2bd2c.patch
Patch109: sap-preconfigure-#92-db1ed07c66286edbee756ed3504649975d333306.patch
BuildArch: noarch BuildArch: noarch
Requires: uuidd
Requires: rhel-system-roles
%if %{with html}
# Requirements for md2html.sh to build the documentation
%if 0%{?fedora} || 0%{?rhel} >= 9
BuildRequires: rubygem-kramdown-parser-gfm
%else
BuildRequires: pandoc
BuildRequires: asciidoc
BuildRequires: highlight
%endif
%endif
# Requirements for galaxy_transform.py
BuildRequires: python3
%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python3dist(ruamel.yaml)
Requires: python3-jmespath
Requires: python3-netaddr
%else
BuildRequires: python3-ruamel-yaml
Requires: python-jmespath
Requires: python-netaddr
%endif
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
# in buildroot as it depended on modular Python.
# It has been installable at buildtime in 8.8 and newer.
%if %{with collection}
%if 0%{?rhel} >= 8
BuildRequires: ansible-core >= 2.11.0
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
%endif
%endif
%if %{undefined __ansible_provides}
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{version}
%endif
# be compatible with the usual Fedora Provides:
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
# ansible-galaxy is available by ansible-core on RHEL 8.6 and newer at buildtime.
%define ansible_collection_build() ansible-galaxy collection build
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%if 0%{?fedora} || 0%{?rhel} >= 8
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
%else
%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1}
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
%endif
%endif
%description %description
Collection of Ansible roles which configures a RHEL system according Collection of Ansible roles which configures a RHEL system according
to applicable SAP notes so that any SAP software can be installed. to applicable SAP notes so that any SAP software can be installed.
%if %{with collection_artifact}
%package collection-artifact
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
%description collection-artifact
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%prep %prep
%setup -q -T -c -n %{name}-%{version} -a 0 -a 1 -a 2 %setup -q -a1 -n auto-maintenance-%{mainid}
pushd sap-hana-preconfigure
%patch0 -p1 pushd %{github_repo_sap_install}-%{commit_id_sap_install}/
%patch1 -p1 %patch -P1 -p1
%patch2 -p1 %patch -P2 -p1
%patch3 -p1 %patch -P3 -p1
%patch4 -p1 # workaround for md2html error
%patch5 -p1 sed -i -e "s|for POWER ||g" roles/sap_hana_preconfigure/README.md
%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
popd popd
# remove all SLES stuff # remove zero file and symlinks
rm -rf sap-hana-preconfigure/tasks/SLES find . -type f -size 0 -delete
rm -rf sap-hana-preconfigure/tasks/SLES15 find . -type l -delete
rm -rf sap-hana-preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc
rm -rf sap-hana-preconfigure/tasks/sapnote/1944799* # SLES - HANA install and config guidelines
rm -rf sap-hana-preconfigure/tasks/sapnote/2578899 # SLES 15 - installation
rm -rf sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA
rm -f sap-hana-preconfigure/vars/SLES_15.yml
# remove all RHEL 6 stuff # fix python and bash shebangs
rm -f sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!/usr/bin/python3=' {} +
rm -f sap-hana-preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */bin/bash=#!/usr/bin/bash=' {} +
rm -f sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings
rm -f sap-hana-preconfigure/vars/RedHat_6.5.yml # remove json files, these are already present in the collection subdirectory
rm -f sap-hana-preconfigure/vars/RedHat_6.6.yml rm -f FILES.json MANIFEST.json
rm -f sap-hana-preconfigure/vars/RedHat_6.7.yml
%build %build
%if %{with html}
readmes=""
for role in %{rolenames}; do
readmes="${readmes} %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md"
done
sh md2html.sh $readmes %{github_repo_sap_install}-%{commit_id_sap_install}/README.md
%endif
%if %{with collection}
# create dest-path
mkdir .collections
for role in %{rolenames} ; do
LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 lsr_role2collection.py --role "$role" \
--src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \
--src-owner %{src_owner} \
--dest-path .collections \
--namespace %{collection_namespace} \
--collection %{collection_name} \
--new-role "$new_role"
done
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# update README.md
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# Build the collection
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_build
popd
%endif
%install %install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure \ $RPM_BUILD_ROOT%{_pkgdocdir}
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure
# drop zero file # create file selection for documents
rm -f */.gitignore sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml echo "%dir %{_pkgdocdir}" > files_section.txt
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/
cp -pR sap-hana-preconfigure sap-preconfigure sap-netweaver-preconfigure $RPM_BUILD_ROOT%{_datadir}/ansible/roles/ %if %{with html}
cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/ cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.html $RPM_BUILD_ROOT%{_pkgdocdir}/
cp -p sap-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure/ %endif
cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure/ echo "%{_pkgdocdir}/README.*" >> files_section.txt
%files for role in %{rolenames} ; do
%dir %{_pkgdocdir} mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/$role
%dir %{_pkgdocdir}/sap-preconfigure cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
%dir %{_pkgdocdir}/sap-hana-preconfigure install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/LICENSE \
%dir %{_pkgdocdir}/sap-netweaver-preconfigure %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md \
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
%if %{with html}
install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.html \
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
%endif
echo "%dir %{_pkgdocdir}/$role" >> files_section.txt
done
# install collection files
%if %{with collection}
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_install
popd
%else
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/collections $RPM_BUILD_ROOT%{_datadir}/ansible/
%endif
# install collection_artifact
%if %{with collection_artifact}
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_BUILD_ROOT%{_datadir}/ansible/collections/
popd
%endif
%files -f files_section.txt
%dir %{_datadir}/ansible %dir %{_datadir}/ansible
%dir %{_datadir}/ansible/roles %dir %{_datadir}/ansible/roles
%doc %{_pkgdocdir}/*/README.md %doc %{_pkgdocdir}/*/README.md
%license %{_pkgdocdir}/*/LICENSE %license %{_pkgdocdir}/*/LICENSE
%{_datadir}/ansible/roles/* %{_datadir}/ansible/roles/*
%if %{with html}
%{_pkgdocdir}/*/README.html
%endif
%if %{with collection}
%{ansible_collection_files}
%else
%{_datadir}/ansible/collections
%endif
%if %{with collection_artifact}
%files collection-artifact
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%changelog %changelog
* Mon Feb 05 2024 Than Ngo <than@redhat.com> - 3.6.0-2
- sap_hypervisor_node_preconfigure: fix for role name and path for included tasks
- update collection files
Related: RHEL-16897
* Thu Jan 25 2024 Than Ngo <than@redhat.com> - 3.6.0-1
- rebase sap roles to version 1.3.4
- add collection files
- update README files and add missing galaxy.yml, LICENSE
- fix syntax error for defining dependent collections in galaxy.yml
- add tools and tests
Resolves: RHEL-16897
* Mon May 08 2023 Than Ngo <than@redhat.com> - 3.5.0-1
- updated README.md files for sap and sap_swpm roles
- migrated to SPDX license
- converted patch macro use to the most compatible syntax
- rebased sap roles to version 1.2.3
Resolves: #2185037
* Mon Jan 30 2023 Than Ngo <than@redhat.com> - 3.4.0-3
- Related: #2155876, rebase sap roles to version 1.2.1
* Thu Jan 19 2023 Than Ngo <than@redhat.com> - 3.4.0-2
- Related: #2155876, compat-sap-c++-10 is not available for RHEL 8.2 and earlier on hardware platform s390x
* Wed Jan 11 2023 Than Ngo <than@redhat.com> - 3.4.0-1
- Resolves: #2155876, rebase sap roles to version 1.2.0
* Tue Nov 22 2022 Than Ngo <than@redhat.com> - 3.3.0-4
- Resolves: #2142957, drop deprecated paramater for Ansible 2.14
* Fri Jul 15 2022 Than Ngo <than@redhat.com> - 3.3.0-3
- update galaxy.yml and README.md and url
Related: #2103633
* Tue Jul 12 2022 Than Ngo <than@redhat.com> - 3.3.0-2
- make the role Ansible 2.13 compliant
- get rid of all the new ansible-lint 6.3.0 errors for preconfigure and sap_hana_install roles
Resolves: #2103633
* Mon Jul 04 2022 Than Ngo <than@redhat.com> - 3.3.0-1
- Resolves: #2103633, include roles for setting up a two-node SAP HANA pacemaker cluster
* Thu Jun 09 2022 Than Ngo <than@redhat.com> - 3.2.0-3
- sap_hana_preconfigure: Add vars for RHEL 9.1 managed nodes
- sap_general_preconfigure: fix variable inclusion for RHEL minor releases
Related: #2063050
* Wed Jun 08 2022 Than Ngo <than@redhat.com> - 3.2.0-2
- sap_general_preconfigure: do not attempt to enable HANA repos for s390x
- sap_hana_preconfigure: using wrong variable name
- sap_hana_preconfigure: Fix issue sap-linuxlab#154
Related: #2063050
* Mon Mar 21 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2063050, rebase to new upstream org sap-linuxlab
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #2016858, increase release to avoid update conflict
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- Related: #2016858, rebase
* Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-7
- Resolves: #2016858, ansible-lint cleanup
* Wed Sep 08 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- set min kernel version for RHEL 8.4 x86_64
- use grubby for setting tsx=on
- add tsx=on to the kernel command line unconditionally
* Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-5
- Related: #1928398, fix yum group install errors on RHEL 7
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-4
- Related: #1928398, fix #149, #177, #193, #194
* Mon Jul 12 2021 Than Ngo <than@redhat.com> - 3.1.1-3
- add missing __sap_preconfigure_envgroups for RHEL 7.x
- add __sap_hana_preconfigure_req_repos variables for RHEL 8.5 and later
Related: #1928398
* Thu Jul 01 2021 Than Ngo <than@redhat.com> - 3.1.1-2
- Related: #1928398, add missing changelogs
* Tue Jun 29 2021 Than Ngo <than@redhat.com> - 3.1.1-1
- Resolves: #1928398, rebase to 3.1.1 for Ansible Collections
* Fri Mar 05 2021 Than Ngo <than@redhat.com> - 3.0.1-4
- fixed issue #130 in sap-preconfigure
- fixed typos in README.md in sap_hana_preconfigure
- added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md
- fixed issue #170 in sap_hana_preconfigure
Related: #1891642
* Wed Feb 24 2021 Than Ngo <than@redhat.com> - 3.0.1-3
- Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-2
- Related: #1891642, update sap-hana-preconfigure 3.0.1 and fixed Urls
* Thu Feb 18 2021 Than Ngo <than@redhat.com> - 3.0.1-1
- Related: #1891642, rebase to 3.0.1
* Mon Feb 15 2021 Than Ngo <than@redhat.com> - 3.0.0-2
- Related: #1891642, more fixes #145, #148, #149, #150 #147
* Thu Jan 28 2021 Than Ngo <than@redhat.com> - 3.0.0-1
- Resolves: #1891638, bug fixes
- Resolves: #1891642, new features
* Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7 * Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7
- Related: #1867027, fix #119 - Related: #1867027, fix #119