Skip to content

Commit

Permalink
unixPB: RISC-V updates and use docker.io on Ubuntu 20+
Browse files Browse the repository at this point in the history
  • Loading branch information
sxa committed Jun 9, 2023
1 parent 3cecbf3 commit 5b2692d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@
when: ansible_distribution != "MacOSX"
- gcc_48
- role: gcc_7 # OpenJ9
when: ansible_architecture != "riscv64"
tags: [build_tools, build_tools_openj9]
- role: gcc_9 # Dragonwell
tags: [build_tools]
when: ansible_architecture != "riscv64"
- role: gcc_10 # JDK17+
tags: [build_tools]
when: ansible_architecture != "riscv64"
- role: gcc_11 # JDK19+
tags: [build_tools]
when: ansible_architecture != "riscv64"
- role: Xcode
when: ansible_distribution == "MacOSX"
tags: [build_tools, xcode, adoptopenjdk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@
####################
# Set default Java #
####################

- name: Install 'openjdk-8-jdk' package
package:
name: locales
state: present
when: ansible_architecture != "riscv64"

- name: Set default java version for x86_64
alternatives:
name: java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Build_Tool_Packages:
- libxtst-dev
- make
- ntp
- openjdk-8-jdk
- pigz
- pkg-config
- systemtap-sdt-dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
- docker-ce
state: latest # TODO: Package installs should not use latest
use: auto # automatic select package manager to use yum, apt and so on
when: ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and (ansible_distribution_major_version >= "7")) or (ansible_distribution == "Ubuntu" or ansible_distribution == "Debian")
when: ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and (ansible_distribution_major_version >= "7")) or ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int < 20) or ansible_distribution == "Debian")

- name: Install default docker on Ubuntu 22+
package:
name:
- docker.io
state: latest # TODO: Package installs should not use latest
use: auto # automatic select package manager to use yum, apt and so on
when: ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int >= 20) or ansible_distribution == "Debian")

- name: Install for SLES15 # zypper does not support in package module
include_tasks: sles.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,39 @@
state: present
when:
- ansible_architecture == "x86_64"
- ansible_distribution_major_version | int < 20

- name: Add Docker Repo for Ubuntu s390x
apt_repository:
repo: "deb [arch=s390x] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
when:
- ansible_architecture == "s390x"
- ansible_distribution_major_version | int < 20

- name: Add Docker Repo for Ubuntu ppc64le
apt_repository:
repo: "deb [arch=ppc64el] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
when:
- ansible_architecture == "ppc64le"
- ansible_distribution_major_version | int < 20

- name: Add Docker Repo for Ubuntu aarch64
apt_repository:
repo: "deb [arch=arm64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
when:
- ansible_architecture == "aarch64"
- ansible_distribution_major_version | int < 20

- name: Add Docker Repo for Ubuntu armv7l
apt_repository:
repo: "deb [arch=armhf] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
when:
- ansible_architecture == "armv7l"
- ansible_distribution_major_version | int < 20

- name: Install Docker prerequisites for Ubuntu
apt:
Expand Down

0 comments on commit 5b2692d

Please sign in to comment.