Skip to content

Commit

Permalink
updates to support RHEL 8 playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sej-jackson committed Feb 6, 2020
1 parent 2dcead2 commit 4b07421
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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 #
#################
Expand All @@ -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 #
####################
Expand Down Expand Up @@ -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 #
###########
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Build_Tool_Packages:
- make
- mesa-libGL-devel
- mpfr-devel
- ntp
- openssl-devel
- perl-CPAN
- perl-devel
Expand All @@ -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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

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

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

0 comments on commit 4b07421

Please sign in to comment.