use collections; use FQCN for all tasks

This commit is contained in:
Lee Goolsbee
2022-09-07 15:59:15 -05:00
parent e1f5521652
commit 694f1c2874
47 changed files with 243 additions and 230 deletions

View File

@@ -4,7 +4,7 @@
block:
- name: Add Adoptium yum repository
yum_repository:
ansible.builtin.yum_repository:
name: Adoptium
file: adoptium
description: Adoptium Repo
@@ -14,12 +14,14 @@
state: present
- name: Install Eclipse Temurin JDK
yum:
ansible.builtin.yum:
name: "temurin-{{ java_major_version }}-jdk"
state: present
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Ensure common JDK symlink exists
alternatives:
community.general.alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
@@ -30,6 +32,8 @@
- runtime_pkg
- name: Install other base packages on Amazon Linux
yum:
ansible.builtin.yum:
name:
- dejavu-fonts-common # Required by the installer
vars:
ansible_python_interpreter: /usr/bin/python2

View File

@@ -1,4 +1,4 @@
---
- name: Perform distro-specific tasks
include_tasks: "{{ ansible_distribution|lower }}.yml"
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"

View File

@@ -4,29 +4,29 @@
block:
- name: Install gnupg
apt:
ansible.builtin.apt:
name: gnupg
state: present
- name: Add Adoptium debian repo public key
apt_key:
ansible.builtin.apt_key:
url: https://packages.adoptium.net/artifactory/api/gpg/key/public
state: present
- name: Add Adoptium debian repository
apt_repository:
ansible.builtin.apt_repository:
repo: "deb https://packages.adoptium.net/artifactory/deb {{ ansible_distribution_release }} main"
state: present
filename: adoptium
- name: Install Eclipse Temurin JDK
apt:
ansible.builtin.apt:
name: "temurin-{{ java_major_version }}-jdk"
update_cache: yes
state: present
- name: Ensure common JDK symlink exists
alternatives:
community.general.alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk-{{ debian_architecture }}"
@@ -37,6 +37,6 @@
- runtime_pkg
- name: Install other base packages on Ubuntu
package:
ansible.builtin.package:
name:
- fonts-dejavu-core # Required by installer