install amazon-cloudwatch-agent from package sources instead of direct RPM on AL2022; add workaround for missing group

This commit is contained in:
Lee Goolsbee
2022-12-15 15:19:33 -06:00
parent 342848424f
commit 70fb0fbd32

View File

@@ -9,10 +9,17 @@
- git
- ec2-utils
# https://github.com/amazonlinux/amazon-linux-2022/issues/164
- name: Ensure group "aoc" exists
ansible.builtin.group:
name: aoc
state: present
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
- name: Install CloudWatch Agent
ansible.builtin.dnf:
name:
- "{{ aws_cloudwatch_agent_rpm }}"
- amazon-cloudwatch-agent
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
notify:
- Enable CloudWatch Agent