-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathaws_ec2.yml.dist
30 lines (29 loc) · 1.43 KB
/
aws_ec2.yml.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Configuration reference:
# - https://docs.ansible.com/ansible/latest/collections/amazon/aws/docsite/aws_ec2_guide.html
# - https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html
# - https://docs.ansible.com/ansible/latest/collections/community/aws/aws_ssm_connection.html
plugin: aws_ec2
regions:
- us-east-2
hostnames:
# This is how each host will be displayed when executing the Ansible playbook.
- tag:Name
filters:
# Select instances to run this playbook on
tag:pre_release_name: PRE_RELEASE_NAME
tag:instance_type: test-executor
groups:
suse_12: "tags.os_version.startswith('12')"
suse_15: "tags.os_version.startswith('15')"
windows: "'windows-server' in tags.os_distro"
linux: "'windows-server' not in tags.os_distro"
compose:
# This is how the Ansible SSM plugin will connect to each host. We cannot use the hostname (tag:Name) directly because
# it contains "." characters, which are not allowed by the SSM plugin.
ansible_host: instance_id
# Host variables that are strings (not variables) need to be wrapped with two sets of quotes.
# See https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins for details.
ansible_connection: '"community.aws.aws_ssm"'
ansible_aws_ssm_bucket_name: '"logging-e2e-testing-ssm-transfers-hema-testing"'
ansible_aws_ssm_bucket_sse_mode: '"AES256"'
ansible_aws_ssm_region: '"us-east-2"'