DCD-1020: Make/enforce assumption that JVM packages setup a common symlink.

This commit is contained in:
Steve Smith
2020-08-21 13:03:35 +10:00
parent b66d08b443
commit 43996fffcd
3 changed files with 20 additions and 7 deletions

View File

@@ -51,7 +51,7 @@
lineinfile:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
insertafter: "EOF"
line: 'export JAVA_HOME=/usr/lib/jvm/jre-{{ java_version }}-openjdk'
line: "export JAVA_HOME={{ atl_java_home }}"
- name: Create application directories
file:
@@ -152,4 +152,4 @@
- name: Remove crowd.xml to prevent duplicates from appearing in cluster reporting
file:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/conf/Catalina/localhost/crowd.xml"
state: absent
state: absent

View File

@@ -1,9 +1,20 @@
---
- name: Install JDK if necessary on Ubuntu
package:
name:
- openjdk-{{ java_major_version }}-jdk-headless
block:
- name: Install JDK package
package:
name:
- openjdk-{{ java_major_version }}-jdk-headless
- name: Ensure common symlink exists
alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/java-8-openjdk-amd64"
priority: 99
when: atl_use_system_jdk
tags:
- runtime_pkg