mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(ansible): improve article and examples for aws ssm integration
This commit is contained in:
26
examples/ansible/aws_ec2.yml
Normal file
26
examples/ansible/aws_ec2.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
################################################################################
|
||||
## aws_ec2.yml
|
||||
##
|
||||
## Dynamic inventory for integration with AWS SSM.
|
||||
## Makes use of the 'aws_ec2' plugin.
|
||||
## The file must be named 'aws_ec2.yml'.
|
||||
################################################################################
|
||||
|
||||
plugin: aws_ec2
|
||||
regions:
|
||||
- eu-east-2
|
||||
keyed_groups:
|
||||
- key: tags.Name
|
||||
# add hosts to 'tag_Name_<tag_value>' groups for each aws_ec2 host's 'Tags.Name' attribute
|
||||
prefix: tag_Name_
|
||||
separator: ""
|
||||
- key: tags.application
|
||||
# add hosts to 'tag_application_<tag_value>' groups for each aws_ec2 host's 'Tags.application' attribute
|
||||
prefix: tag_application_
|
||||
separator: ""
|
||||
hostnames:
|
||||
- instance-id
|
||||
# acts as keyword to use the instances' 'InstanceId' attribute
|
||||
# use 'private-ip-address' to use the instances' 'PrivateIpAddress' attribute instead
|
||||
Reference in New Issue
Block a user