diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/CPAN/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/CPAN/tasks/main.yml index ad9ae1c305..7c20927c7c 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/CPAN/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/CPAN/tasks/main.yml @@ -32,6 +32,8 @@ # All - name: Install JSON command: cpanm --with-recommends --sudo JSON + when: + - not ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "8") tags: - cpan - json @@ -40,6 +42,8 @@ - name: Install Text::CSV command: cpanm --with-recommends --sudo Text::CSV + when: + - not ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "8") tags: - cpan - text_csv @@ -48,7 +52,9 @@ - name: Install XML::Parser command: cpanm --with-recommends --sudo XML::Parser - when: ansible_distribution != "SLES" and ansible_distribution_major_version != "12" + when: + - not (ansible_distribution == "SLES" and ansible_distribution_major_version == "12") + - not ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "8") tags: - cpan - xml_parser 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 d491a29844..a9dec9acd7 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml @@ -51,6 +51,13 @@ ########################## # Additional build tools # ########################## +- name: Install additional build tools if NOT RHEL 8 + package: "name={{ item }} state=latest" + with_items: "{{ Additional_Build_Tools_NOT_RHEL8 }}" + when: + - (ansible_distribution_major_version != "8") + tags: build_tools + - name: Install additional build tools for RHEL 7 package: "name={{ item }} state=latest" with_items: "{{ Additional_Build_Tools_RHEL7 }}" @@ -93,6 +100,13 @@ - ansible_architecture == "s390x" tags: build_tools +- name: Install additional build tools for RHEL 8 + package: "name={{ item }} state=latest" + with_items: "{{ Additional_Build_Tools_RHEL8 }}" + when: + - (ansible_distribution_major_version == "8") + tags: build_tools + ################# # xorg Packages # ################# @@ -112,13 +126,20 @@ - name: Install Java (Not RedHat 6 on ppc64) package: "name={{ item }} state=latest" with_items: "{{ Java_NOT_RHEL6_PPC64 }}" - when: not (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64") + when: + - not (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64") + - not (ansible_distribution_major_version == "8") - name: Install Java when RedHat 6 on ppc64 package: "name={{ item }} state=latest" with_items: "{{ Java_RHEL6_PPC64 }}" when: (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64") +- name: Install Java when RedHat 8 + package: "name={{ item }} state=latest" + with_items: "{{ Java_RHEL8 }}" + when: (ansible_distribution_major_version == "8") + #################### # Set default Java # #################### @@ -171,6 +192,12 @@ - ansible_architecture == "s390x" tags: default_java +- name: Set default java version - RHEL 8 + shell: update-alternatives --set java java-1.8.0-openjdk.{{ ansible_architecture }} + when: + - ansible_distribution_major_version == "8" + tags: default_java + ########### # Locales # ########### 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 c83d0f6e06..fbfe59897d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/RedHat.yml @@ -38,7 +38,6 @@ Build_Tool_Packages: - make - mesa-libGL-devel - mpfr-devel - - ntp - openssl-devel - perl-CPAN - perl-devel @@ -49,6 +48,15 @@ Build_Tool_Packages: - xz - zip +Additional_Build_Tools_NOT_RHEL8: + - ntp # in RHEL8, ntp package is replaced by chrony + +Additional_Build_Tools_RHEL8: + - glibc-locale-source + - glibc-langpack-ja # required for creating Japanese locales + - glibc-langpack-ko # required for creating Korean locales + - glibc-langpack-zh # required for creating Chinese locales + Additional_Build_Tools_RHEL7: - libstdc++-static @@ -70,7 +78,10 @@ Additional_Build_Tools_RHEL_s390x: - glibc-devel.s390 # a dependency required for executing a 32-bit C binary - libstdc++.s390 # a dependency required for executing a 32-bit C binary -Java_NOT_RHEL6_PPC64: +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 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/gmake/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/gmake/tasks/main.yml index 88a4b0364f..eb538e0b7e 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/gmake/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/gmake/tasks/main.yml @@ -8,13 +8,17 @@ # s390x, x86_64, on SLES12 on x86_64 and on Ubuntu14 on x86_64 # Proceed with downloading and installing make # Addresses https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/499 +# For RHEL 8, use gmake 4.2.1 already installed. - name: Test if self-built make 4.1 is available shell: /usr/local/bin/make --version >/dev/null ignore_errors: yes register: goodmake_installed when: - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ((((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and ansible_architecture == "x86_64")) + - (((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or + (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and + ansible_architecture == "x86_64" + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version != "8" tags: goodmake_source - name: Download make 4.1 source @@ -23,7 +27,10 @@ dest: /tmp/make-4.1.tar.gz mode: 0440 when: - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ((((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and ansible_architecture == "x86_64")) + - (((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or + (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and + ansible_architecture == "x86_64" + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version != "8" - goodmake_installed.rc != 0 tags: goodmake_source @@ -33,14 +40,20 @@ dest: /tmp copy: False when: - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ((((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and ansible_architecture == "x86_64")) + - (((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or + (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and + ansible_architecture == "x86_64" + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version != "8" - goodmake_installed.rc != 0 tags: goodmake_source - name: Compile and install make 4.1 from source shell: cd /tmp/make-4.1 && ./configure --prefix=/usr/local && make clean && make -j {{ ansible_processor_vcpus }} && make install when: - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ((((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and ansible_architecture == "x86_64")) + - (((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or + (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and + ansible_architecture == "x86_64" + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version != "8" - goodmake_installed.rc != 0 tags: goodmake_source @@ -52,6 +65,9 @@ group: root state: link when: - - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ((((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and ansible_architecture == "x86_64")) + - (((ansible_distribution == "SLES" or ansible_distribution == "openSUSE") and ansible_distribution_major_version == "12") or + (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14")) and + ansible_architecture == "x86_64" + - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version != "8" - goodmake_installed.rc != 0 tags: goodmake_source