DCD-1037 use AdoptOpenJDK from official repos

This commit is contained in:
Lee Goolsbee
2020-08-07 13:57:08 -05:00
parent 5bae465412
commit 45c2d01b17
5 changed files with 45 additions and 22 deletions

View File

@@ -1,10 +1,26 @@
---
- name: Install JDK if necessary on Amazon Linux
yum:
name:
- java-1.{{ java_major_version }}.0-openjdk-devel
- name: Add AdoptOpenJDK repo and install if necessary on Amazon Linux
block:
- name: Add AdoptOpenJDK yum repository
yum_repository:
name: AdoptOpenJDK
file: adoptopenjdk
description: AdoptOpenJDK Repo
baseurl: "https://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/amazonlinux/{{ ansible_distribution_version }}/{{ ansible_architecture }}/"
gpgkey: https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
gpgcheck: yes
state: present
- name: Install AdoptOpenJDK
yum:
name: "adoptopenjdk-{{ java_major_version }}-hotspot"
state: present
when: atl_use_system_jdk
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux
yum: