From afba496338a75424dc7a76fa0f34f07243cd4bf6 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Fri, 8 Mar 2024 16:57:29 +0000 Subject: [PATCH] Updates following linter failures Signed-off-by: Stewart X Addison --- .../roles/bootjdk/tasks/openjdk.yml | 4 ++-- .../roles/adoptopenjdk_install/tasks/main.yml | 3 --- .../playbooks/AdoptOpenJDK_Windows_Playbook/main.yml | 2 ++ .../roles/Java_install/tasks/main.yml | 10 ++++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/bootjdk/tasks/openjdk.yml b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/bootjdk/tasks/openjdk.yml index 1ba754d0ab..6ebdd716b3 100644 --- a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/bootjdk/tasks/openjdk.yml +++ b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/bootjdk/tasks/openjdk.yml @@ -31,7 +31,7 @@ delay: 5 when: - java_installed.stat.isdir is not defined - - ! ( jdk == 8 or jdk == 11 or jdk >= 17 ) + - jdk == 10 or jdk == 16 # These are the only two we still use from adoptopenjdk API register: openjdk - name: Download JDK {{ jdk }} binary from api.adoptium.net @@ -44,7 +44,7 @@ delay: 5 when: - java_installed.stat.isdir is not defined - - jdk == 8 or jdk == 11 or jdk >= 17 + - ! ( jdk == 10 or jdk == 16 ) register: openjdk - name: Download JDK {{ jdk }} binary diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml index b213ef24ed..1821386b52 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml @@ -187,7 +187,6 @@ path: /tmp/jdk{{ jdk_version }}.tar.gz state: absent -<<<<<<< HEAD # JDK 21 on Linux-riscv64 is a special-case because JDK 21 is the first version that supports # RISC-V. There is also no JDK 21 or 20 available on Ubuntu 20.04 that we can use as boot JDK. - name: Install JDK {{ jdk_version }} on Linux-riscv64 @@ -219,8 +218,6 @@ path: /tmp/jdk21.tar.gz state: absent -======= ->>>>>>> b240053 (Use correct API for each JDK version) # JDK 19 on Linux-riscv64 is a special-case because JDK 19 is the first version that supports # RISC-V. There is also no JDK 19 or 20 available on Ubuntu 20.04 that we can use as boot JDK. - name: Install JDK {{ jdk_version }} on Linux-riscv64 diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml index f665a2de5f..afc10a15c5 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml @@ -59,6 +59,8 @@ jdk_version: 10 - role: Java_install # For Gradle jdk_version: 11 + - role: Java_install # Latest LTS, for use by agents + jdk_version: 16 - role: Java_install # Latest LTS, for use by agents jdk_version: 17 - role: Java_install # Bootstrap for JDK21 diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml index b096bf0df3..8733a98fc3 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml @@ -22,9 +22,9 @@ - ! ( jdk_version == 8 || jdk_version == 11 || jdk_version >= 17 ) tags: adoptopenjdk_install -- name: Download Java{{ jdk_version }} +- name: Download Temurin JDK {{ jdk_version }} win_get_url: - url: {{ api_url }}/v3/binary/latest/{{ jdk_version }}/ga/windows/x64/jdk/{{ bootjdk }}/normal/adoptopenjdk?project=jdk + url: {{api_url}}/v3/binary/latest/{{ jdk_version }}/ga/windows/x64/jdk/{{ bootjdk }}/normal/adoptopenjdk?project=jdk dest: 'C:\temp\jdk-{{ jdk_version }}.zip' when: not java_installed.stat.exists and jdk_version!=10 tags: Java_install @@ -32,9 +32,11 @@ # Java 10 is the only version we still need to retrieve from adoptopenjdk - name: Download Java{{ jdk_version }} from adoptopenjdk win_get_url: - url: {{ api_url }}/v3/binary/latest/{{ jdk_version }}/ga/windows/x64/jdk/{{ bootjdk }}/normal/adoptopenjdk?project=jdk + url: {{api_url}}/v3/binary/latest/{{ jdk_version }}/ga/windows/x64/jdk/{{ bootjdk }}/normal/adoptopenjdk?project=jdk dest: 'C:\temp\jdk-{{ jdk_version }}.zip' - when: not java_installed.stat.exists and jdk_version==10 + when: + - not java_installed.stat.exists + - jdk_version==10 or jdk_version==16 tags: Java_install - name: Install Java{{ jdk_version }}