From 885e859fd125d79f1f769b90b3fd61156e9d2281 Mon Sep 17 00:00:00 2001 From: Aswathy S Kumar Date: Tue, 3 Dec 2024 00:32:01 +0530 Subject: [PATCH] Add conditionals for Rhel9 in common role Signed-off-by: Aswathy S Kumar --- .../roles/Common/tasks/RedHat.yml | 11 +++++------ .../roles/Common/vars/RedHat.yml | 15 ++------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml index 9b800f2ed1..6272b72992 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml @@ -16,12 +16,11 @@ - ansible_architecture == "x86_64" tags: patch_update -- name: Enable EPEL release for RHEL9 or RHEL8 or RHEL6 or RHEL7 +- name: Enable EPEL release for RHEL yum: name=https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm failed_when: false when: - ansible_architecture != "s390x" - - (ansible_distribution_major_version | int >= 6) tags: patch_update - name: YUM upgrade all packages @@ -52,9 +51,9 @@ ########################## # Additional build tools # ########################## -- name: Install additional build tools if NOT RHEL 8 AND RHEL9 +- name: Install additional build tools if NOT RHEL8 and above package: "name={{ item }} state=latest" - with_items: "{{ Additional_Build_Tools_NOT_RHEL8 }}" + with_items: "{{ Additional_Build_Tools_NOT_RHEL8Plus }}" when: - not (ansible_distribution_major_version | int >= 8) tags: build_tools @@ -102,9 +101,9 @@ - (ansible_distribution_major_version == "6") or (ansible_distribution_major_version == "7") tags: build_tools -- name: Install additional build tools for RHEL >= 8 +- name: Install additional build tools for RHEL8 and above package: "name={{ item }} state=latest" - with_items: "{{ Additional_Build_Tools_RHEL8 }}" + with_items: "{{ Additional_Build_Tools_RHEL8Plus }}" when: - (ansible_distribution_major_version | int >= 8) tags: build_tools diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml index 6022f90a62..87852f960b 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml @@ -56,12 +56,12 @@ Build_Tool_Packages: - xz - zip -Additional_Build_Tools_NOT_RHEL8: +Additional_Build_Tools_NOT_RHEL8Plus: - libdwarf-devel # now in CodeReady Linux Builder (CRB) repo - libmpc-devel # now in CodeReady Linux Builder (CRB) repo - ntp # in RHEL8, ntp package is replaced by chrony -Additional_Build_Tools_RHEL8: +Additional_Build_Tools_RHEL8Plus: - glibc-locale-source - glibc-langpack-ja # required for creating Japanese locales - glibc-langpack-ko # required for creating Korean locales @@ -92,17 +92,6 @@ Additional_Build_Tools_RHEL7_s390x: - libstdc++.s390 # a dependency required for executing a 32-bit C binary - yum-utils # yumdownloader required for devkit creation -Java_RHEL8: - - java-1.8.0-openjdk-devel - -Java_NOT_RHEL6_PPC64: # Not RHEL8 either - - java-1.7.0-openjdk-devel - - java-1.8.0-openjdk-devel - -Java_RHEL6_PPC64: - - java-1.7.0-ibm-devel - - java-1.8.0-ibm-devel - Test_Tool_Packages: - acl - perl