Files
dc-deployments-automation/roles/product_common/tasks/amazon-2023.yml

42 lines
1.5 KiB
YAML

---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2023
block:
# There is no amazonlinux/2023 package available from the Adoptium repo; AL2023 docs point to upstream compatiblity
# with Fedora 34, 35, and 36, so we use the latest of those for the Temurin package for now
- name: Add Adoptium yum repository
ansible.builtin.yum_repository:
name: Adoptium
file: adoptium
description: Adoptium Repo
baseurl:
- "https://packages.adoptium.net/artifactory/rpm/fedora/36/{{ ansible_architecture }}"
- "{{ atl_adoptium_alternate_url is defined | ternary(atl_adoptium_alternate_url, '') }}"
gpgkey:
- https://packages.adoptium.net/artifactory/api/gpg/key/public
- "{{ atl_adoptium_gpgkey_alternate_url is defined | ternary(atl_adoptium_gpgkey_alternate_url, '') }}"
gpgcheck: yes
state: present
- name: Install Eclipse Temurin JDK
ansible.builtin.yum:
name: "temurin-{{ java_major_version }}-jdk"
state: present
- name: Ensure common JDK symlink exists
community.general.alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
priority: 99
when: atl_use_system_jdk | bool
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux 2023
ansible.builtin.dnf:
name:
- dejavu-fonts-all # Required by the installer