Merged in ITPLT-4019-add-corretto-jdk-option-for-azl-2023 (pull request #219)

ITPLT-4019 add corretto jdk option for azl 2023

Approved-by: Brett Meehan
This commit is contained in:
Geoff Jacobs
2024-09-02 00:43:45 +00:00
2 changed files with 25 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ postgres_version: "9.6"
# Disable these when using the product installer, otherwise we end up
# fighting with it.
atl_use_system_jdk: false
atl_system_jdk_vendor: "temurin"
# Ubuntu and Ansible use different architecture nomenclature; provide
# an easy method for translating between them

View File

@@ -1,5 +1,5 @@
---
# Temurin JDK installation
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2023
block:
@@ -124,7 +124,29 @@
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
priority: 99
when: atl_use_system_jdk | bool
when:
- atl_use_system_jdk | bool
- atl_system_jdk_vendor == "temurin"
tags:
- runtime_pkg
# Corretto JDK installation
- name: Install Corretto JDK if necessary on Amazon Linux 2023
block:
- name: Install Corretto JDK Headless
ansible.builtin.dnf:
name: "java-{{ java_major_version }}-amazon-corretto-headless"
state: present
- name: Ensure common JDK symlink exists
community.general.alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/java-{{ java_major_version }}-amazon-corretto"
priority: 99
when:
- atl_use_system_jdk | bool
- atl_system_jdk_vendor == "corretto"
tags:
- runtime_pkg