Skip to content

Instantly share code, notes, and snippets.

@Inderpreet90
Last active February 6, 2021 06:02
Show Gist options
  • Save Inderpreet90/69f4fffdf87f85476d2cb6b9f424a85e to your computer and use it in GitHub Desktop.
Save Inderpreet90/69f4fffdf87f85476d2cb6b9f424a85e to your computer and use it in GitHub Desktop.
# Example using filters
plugin: aws_ec2
# Populate inventory with instances in these regions
regions:
- us-east-1
filters:
# All dev and QA hosts
tag:Environment:
- dev
- qa
# Ignores 403 errors rather than failing
strict_permissions: False
# Note: I(hostnames) sets the inventory_hostname. To modify ansible_host without modifying
# inventory_hostname use compose (see example below).
hostnames:
- ip-address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment