mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
Add support for Amazon Linux 2022 * first pass at basic AL2022 support * unpin git version on AL2022 * resolve a few package issues/discrepancies * fix non-Amazon distro support * fix missing nfs.service symlink on AL2022 * remove Ubuntu/Debian install task from aws_common (no existing ubuntu dependency tasks) * add amazonlinux:2022 to list of images for testing via molecule * install amazon-cloudwatch-agent from package sources instead of direct RPM on AL2022; add workaround for missing group * fix typo in task name * add mising amazonlinux:2022 test for product_install role * al2022 -> al2023 * al2023 ships with rpm-installed versions of setuptools and distlib that aren't removable and older than what pipenv requires; use py3.11 instead Approved-by: Vadym Kovalskiy Approved-by: Eugene Ivantsov Approved-by: Yurii Kuzan
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
|
|
# Note: Try and limit these to packages that are distro-specific, and
|
|
# place commonly-named ones below.
|
|
- name: Install Amazon-Linux-specific prerequisites
|
|
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
|
when: ansible_distribution | lower == 'amazon'
|
|
|
|
- name: Install Ubuntu/Debian-specific prerequisites
|
|
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}.yml"
|
|
when: ansible_distribution | lower != 'amazon'
|
|
|
|
- name: Install common support packages
|
|
ansible.builtin.package:
|
|
name:
|
|
- jq
|
|
- tar
|
|
- curl
|
|
- unzip
|
|
- fontconfig
|
|
|
|
- name: Create product group
|
|
ansible.builtin.group:
|
|
name: "{{ atl_product_user }}"
|
|
gid: "{{ atl_product_user_uid }}"
|
|
|
|
- name: Create product user
|
|
ansible.builtin.user:
|
|
name: "{{ atl_product_user }}"
|
|
uid: "{{ atl_product_user_uid }}"
|
|
group: "{{ atl_product_user }}"
|
|
comment: "Product runtime user"
|
|
|
|
- name: Stop systemd-cleanup deleting the jvm socket file
|
|
ansible.builtin.copy:
|
|
src: java.conf
|
|
dest: "/usr/lib/tmpfiles.d/java.conf"
|
|
owner: root
|
|
group: root
|
|
mode: "644"
|
|
register: systemd_config_changed
|
|
|
|
- name: Force systemd to reload daemon configuration
|
|
ansible.builtin.systemd:
|
|
daemon_reload: yes
|
|
when:
|
|
- systemd_config_changed is defined
|
|
- molecule_yml is not defined # molecule cannot run systemctl commands and notest doesn't work for handlers
|