first pass at basic AL2022 support

This commit is contained in:
Lee Goolsbee
2022-12-13 09:32:19 -06:00
parent 1124f1ac5a
commit 13cd669a54
16 changed files with 99 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
---
- name: Install AWS support packages
ansible.builtin.dnf:
name:
- amazon-efs-utils
- amazon-ssm-agent
- awscli
- git
- ec2-utils
- name: Install CloudWatch Agent
ansible.builtin.dnf:
name:
- "{{ aws_cloudwatch_agent_rpm }}"
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
notify:
- Enable CloudWatch Agent

View File

@@ -6,7 +6,7 @@
- notest
- name: Install distro-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
- name: Use EC2 instance ID for cluster node ID
ansible.builtin.set_fact:

View File

@@ -0,0 +1,15 @@
---
- name: Install Google Noto fonts for language coverage
ansible.builtin.dnf:
name:
- "google-noto-*"
- name: Link the language fonts into the JDK
# Not idiomatic, but cleaner than messing with nested lookups...
ansible.builtin.shell:
cmd: "ln -sf /usr/share/fonts/google-noto*/* {{ item }}/"
creates: "{{ item }}/NotoSansJavanese-Regular.ttf"
warn: false
with_items: "{{ atl_fonts_fallback_dirs }}"
changed_when: false # For Molecule idempotence check

View File

@@ -130,4 +130,4 @@
with_items: "{{ atl_fonts_fallback_dirs }}"
- name: Install & configure distro language fonts
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}_fonts.yml"
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}_fonts.yml"

View File

@@ -1,6 +1,6 @@
---
- name: Install Amazon-Linux-specific support packages
- name: Install Amazon-Linux-2-specific support packages
ansible.builtin.yum:
name:
- dejavu-sans-fonts

View File

@@ -0,0 +1,10 @@
---
- name: Install Amazon-Linux-2022-specific support packages
ansible.builtin.dnf:
name:
- dejavu-sans-fonts
- file
- git-{{ git_version }}
- libxml2
- shadow-utils

View File

@@ -3,7 +3,7 @@
# Note: Try and limit these to packages that are distro-specific, and
# place commonly-named ones below.
- name: Install distro-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
- name: Install common support packages
ansible.builtin.package:

View File

@@ -1,6 +1,6 @@
---
- name: Install Amazon-Linux-specific NFS packages
- name: Install Amazon-Linux-2-specific NFS packages
ansible.builtin.yum:
name:
- nfs-utils

View File

@@ -0,0 +1,6 @@
---
- name: Install Amazon-Linux-2022-specific NFS packages
ansible.builtin.dnf:
name:
- nfs-utils

View File

@@ -1,7 +1,7 @@
---
- name: Install distro-specific NFS packages
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
- name: Create mountpoint

View File

@@ -1,6 +1,6 @@
---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2
block:
- name: Add Adoptium yum repository
@@ -31,7 +31,7 @@
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux
- name: Install other base packages on Amazon Linux 2
ansible.builtin.yum:
name:
- dejavu-fonts-common # Required by the installer

View File

@@ -0,0 +1,35 @@
---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2022
block:
- name: Add Adoptium yum repository
ansible.builtin.yum_repository:
name: Adoptium
file: adoptium
description: Adoptium Repo
baseurl: "https://packages.adoptium.net/artifactory/rpm/amazonlinux/{{ ansible_distribution_version }}/{{ ansible_architecture }}"
gpgkey: https://packages.adoptium.net/artifactory/api/gpg/key/public
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 2022
ansible.builtin.dnf:
name:
- dejavu-fonts-common # Required by the installer

View File

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