From: Andrew Grimberg Date: Fri, 16 Sep 2022 17:51:46 +0000 (-0700) Subject: Feat: Install JDK11 on Ubuntu ARM systems X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F70659%2F1;p=ansible%2Froles%2Fjava-install.git Feat: Install JDK11 on Ubuntu ARM systems * Removes aarch64 specific task as this is now fully able to be handled by the default Debian handler * Adds specially handling of the alternatives update depending on system architecture Change-Id: I92a5f55465d2be3aa95167679ead6e697a67cd84 Signed-off-by: Andrew Grimberg --- diff --git a/tasks/Debian-aarch64.yml b/tasks/Debian-aarch64.yml deleted file mode 100644 index 110aa40..0000000 --- a/tasks/Debian-aarch64.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Setup openjdk-r/ppa - apt_repository: - repo: 'ppa:openjdk-r/ppa' - become: true - -- name: Install Java 8 SDK - apt: name=openjdk-8-jdk state=present update_cache=yes - become: true - -- name: Set Java path - set_fact: - java_path: /usr/lib/jvm/java-1.8.0-openjdk-arm64 diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 86782eb..c454abf 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -34,6 +34,14 @@ - ansible_distribution_major_version == "11" or ansible_distribution_version == "20.04" or ansible_distribution_version == "18.04" -- name: Set Java path for OpenJDK 11 +- name: Set Java path for OpenJDK 11 (non-arm) set_fact: java_path: /usr/lib/jvm/java-1.11.0-openjdk-amd64 + when: + - ansible_architecture != "aarch64" + +- name: Set Java path for OpenJDK 11 (arm) + set_fact: + java_path: /usr/lib/jvm/java-1.110-openjdk-arm64 + when: + - ansible_architecture == "aarch64"