mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
DCD-436: Install CloudWatch agent on AWS instances.
This commit is contained in:
5
roles/aws_common/defaults/main.yml
Normal file
5
roles/aws_common/defaults/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
# See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/download-cloudwatch-agent-commandline.html
|
||||
aws_download_region: "{{ ansible_ec2_placement_region | default('us-west-2') }}"
|
||||
aws_cloudwatch_agent_rpm: "https://s3.{{ aws_download_region }}.amazonaws.com/amazoncloudwatch-agent-{{ aws_download_region }}/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm"
|
||||
@@ -10,7 +10,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
@pytest.mark.parametrize('exe', [
|
||||
'/usr/bin/ec2-metadata',
|
||||
'/usr/bin/amazon-ssm-agent',
|
||||
'/sbin/mount.efs'
|
||||
'/sbin/mount.efs',
|
||||
'/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent'
|
||||
])
|
||||
def test_package_exes(host, exe):
|
||||
assert host.file(exe).exists
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
- ec2-utils
|
||||
- amazon-ssm-agent
|
||||
- amazon-efs-utils
|
||||
- "{{ aws_cloudwatch_agent_rpm }}"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Install distro-specific prerequisites
|
||||
include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
|
||||
- name: Fetch local EC2 metadata
|
||||
ec2_metadata_facts:
|
||||
tags:
|
||||
- notest
|
||||
|
||||
- name: Install distro-specific prerequisites
|
||||
include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
|
||||
- name: Use EC2 instance ID for cluster node ID
|
||||
set_fact:
|
||||
atl_cluster_node_id: "{{ ansible_ec2_instance_id }}"
|
||||
|
||||
Reference in New Issue
Block a user