mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
DCD-1020: Make/enforce assumption that JVM packages setup a common symlink.
This commit is contained in:
@@ -34,8 +34,10 @@ atl_product_installation_versioned: "{{ atl_product_installation_base }}/{{ atl_
|
|||||||
atl_product_installation_current: "{{ atl_product_installation_base }}/current"
|
atl_product_installation_current: "{{ atl_product_installation_base }}/current"
|
||||||
atl_installer_temp: "{{ atl_installation_base }}/tmp"
|
atl_installer_temp: "{{ atl_installation_base }}/tmp"
|
||||||
|
|
||||||
atl_jre_home: "{{ 'java' if atl_use_system_jdk else (atl_product_installation_current + '/jre') }}"
|
# NOTE: If using the non-installer java we expect to have the full JDK
|
||||||
atl_java_binary: "{{ atl_jre_home }}/bin/java"
|
# installed and linked to `/usr/lib/jvm/java`, usually via `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_product_logs_default: &logs_default
|
atl_product_logs_default: &logs_default
|
||||||
- path: "{{ atl_product_installation_current }}/logs/*"
|
- path: "{{ atl_product_installation_current }}/logs/*"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
|
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
|
||||||
insertafter: "EOF"
|
insertafter: "EOF"
|
||||||
line: 'export JAVA_HOME=/usr/lib/jvm/jre-{{ java_version }}-openjdk'
|
line: "export JAVA_HOME={{ atl_java_home }}"
|
||||||
|
|
||||||
- name: Create application directories
|
- name: Create application directories
|
||||||
file:
|
file:
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Install JDK if necessary on Ubuntu
|
- name: Install JDK if necessary on Ubuntu
|
||||||
package:
|
block:
|
||||||
name:
|
|
||||||
- openjdk-{{ java_major_version }}-jdk-headless
|
- 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
|
when: atl_use_system_jdk
|
||||||
tags:
|
tags:
|
||||||
- runtime_pkg
|
- runtime_pkg
|
||||||
|
|||||||
Reference in New Issue
Block a user