Blob Blame History Raw
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: