From d22c0222edfc4a7bf27f5f7bf04e15b0e5a7a561 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 21 Aug 2020 13:56:13 +1000 Subject: [PATCH] DCD-1020: We need a JRE symlink too. --- group_vars/aws_node_local.yml | 7 +++++-- roles/product_common/tasks/ubuntu.yml | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/group_vars/aws_node_local.yml b/group_vars/aws_node_local.yml index f951617..4f8cb77 100644 --- a/group_vars/aws_node_local.yml +++ b/group_vars/aws_node_local.yml @@ -35,9 +35,12 @@ atl_product_installation_current: "{{ atl_product_installation_base }}/current" atl_installer_temp: "{{ atl_installation_base }}/tmp" # NOTE: If using the non-installer java we expect to have the full JDK -# installed and linked to `/usr/lib/jvm/java`, usually via `alternatives`. +# installed and linked to `/usr/lib/jvm/java` and # `/usr/lib/jvm/jre`. +# See product_common/task/ubuntu.yml for an example of apropriate +# linking using `alternatives`. atl_java_home: "{{ '/usr/lib/jvm/java' if atl_use_system_jdk else (atl_product_installation_current + '/jre') }}" -atl_java_binary: "{{ atl_java_home }}/bin/java" +atl_jre_home: "{{ '/usr/lib/jvm/jre' if atl_use_system_jdk else atl_java_home }}" +atl_java_binary: "{{ atl_jre_home }}/bin/java" atl_product_logs_default: &logs_default - path: "{{ atl_product_installation_current }}/logs/*" diff --git a/roles/product_common/tasks/ubuntu.yml b/roles/product_common/tasks/ubuntu.yml index 2b0eef8..0b033c5 100644 --- a/roles/product_common/tasks/ubuntu.yml +++ b/roles/product_common/tasks/ubuntu.yml @@ -8,13 +8,20 @@ name: - openjdk-{{ java_major_version }}-jdk-headless - - name: Ensure common symlink exists + - name: Ensure common JDK symlink exists alternatives: link: "/usr/lib/jvm/java" name: "java_sdk" path: "/usr/lib/jvm/java-8-openjdk-amd64" priority: 99 + - name: Ensure common JRE symlink exists + alternatives: + link: "/usr/lib/jvm/jre" + name: "jre" + path: "/usr/lib/jvm/java-8-openjdk-amd64/jre" + priority: 99 + when: atl_use_system_jdk tags: - runtime_pkg