Skip to content

Commit

Permalink
Final fixups, plus inclusing JDK21 where possible
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <sxa@redhat.com>
  • Loading branch information
sxa committed Mar 8, 2024
1 parent 13a2939 commit fba53aa
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
- '8'
- '10'
- '11'
- '16'
- '17'
- '20'
- '21'

- name: Set /usr/java8_64 as default
file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
os_img: "aix/ppc64/jdk"
heap: "normal"
impl: "hotspot"
new_baseurl: "https://api.adoptium.net/v3/binary/latest"
new_vendor: "eclipse"
baseurl: "https://api.adoptopenjdk.net/v3/binary/latest"
vendor: "adoptopenjdk"
adoptium_baseurl: "https://api.adoptium.net/v3/binary/latest"
adoptium_vendor: "eclipse"
adoptopenjdk_baseurl: "https://api.adoptopenjdk.net/v3/binary/latest"
adoptopenjdk_vendor: "adoptopenjdk"
project: "{{ heap }}/{{ vendor }}?project=jdk"
block:
- name: Verify space in /usr
Expand All @@ -21,16 +21,43 @@
path: /usr/java{{ jdk }}_64
register: java_installed

- name: Download JDK {{ jdk }} binary from api.adoptopenjdk.net
get_url:
url: "{{ adoptopenjdk_baseurl }}/{{ jdk }}/ga/{{ os_img }}/{{ impl }}/{{ adoptopenjdk_project }}"
dest: /tmp/jdk{{ jdk }}.tar.gz
mode: 0440
timeout: 25
retries: 3
delay: 5
when:
- java_installed.stat.isdir is not defined
- ! ( jdk == 8 or jdk == 11 or jdk >= 17 )
register: openjdk

- name: Download JDK {{ jdk }} binary from api.adoptium.net
get_url:
url: "{{ adoptium_baseurl }}/{{ jdk }}/ga/{{ os_img }}/{{ impl }}/{{ adoptium_project }}"
dest: /tmp/jdk{{ jdk }}.tar.gz
mode: 0440
timeout: 25
retries: 3
delay: 5
when:
- java_installed.stat.isdir is not defined
- jdk == 8 or jdk == 11 or jdk >= 17
register: openjdk

- name: Download JDK {{ jdk }} binary
get_url:
url: "{{ baseurl }}/{{ jdk }}/ga/{{ os_img }}/{{ impl }}/{{ project }}"
url: "{{ adoptopenjdk_baseurl }}/{{ jdk }}/ga/{{ os_img }}/{{ impl }}/{{ project }}"
dest: /tmp/jdk{{ jdk }}.tar.gz
mode: 0440
timeout: 25
retries: 3
delay: 5
when:
- java_installed.stat.isdir is not defined
- jdk < 17
register: openjdk

- name: Get Signature File Link
Expand Down
7 changes: 1 addition & 6 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,7 @@
- role: adoptopenjdk_install # Current LTS
jdk_version: 21
when:
- ansible_architecture == "riscv64"
tags: build_tools
- role: adoptopenjdk_install # JDK22 Build Bootstrap
jdk_version: 21
when:
- ansible_distribution != "Solaris"
- ansible_architecture != "Solaris"
- ansible_architecture != "armv7l"
tags: build_tools
- role: Nagios_Plugins # AdoptOpenJDK Infrastructure
Expand Down
4 changes: 2 additions & 2 deletions ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
jdk_version: 11
- role: Java_install # Latest LTS, for use by agents
jdk_version: 17
- role: Java_install # Bootstrap for JDK20
jdk_version: 19
- role: Java_install # Bootstrap for JDK21
jdk_version: 20
- role: Java_install # Latest LTS, for use by agents
jdk_version: 21
- ANT # Testing
- role: MSVS_2013
when: ansible_architecture == "64-bit"
Expand Down

0 comments on commit fba53aa

Please sign in to comment.