This Ansible collection provides an inventory plugin for resources managed through AWS System Manager.
It leverages the SSM connection plugin by generating a dynamic inventory of online SSM resources, including EC2 instances and AWS Workspaces using hybrid activations.
- Python 3.x
- boto3
ansible-galaxy collection install ecgalaxy.aws_ssm
# aws_ssm.yml
---
plugin: ecgalaxy.aws_ssm.inventory
directory_name: myad
managed_instance_profile: instance-profile/my-ssm-profile
managed_role: service-role/my-ssm-managed-role
keyed_groups:
- key: BundleId
prefix: "bundle"
- key: DirectoryId
prefix: "directory"
- key: WorkspaceProperties.RunningMode
prefix: "runningmode"
groups:
prod: "'production' in (Environment)"
ubuntu: "'Ubuntu' in (PlatformName)"
See the plugin documentation on Ansible Galaxy.
Copyright the European Union 2024. Licensed under the EUPL-1.2 or later.
ECGALAXY team.