Skip to content

Instantly share code, notes, and snippets.

View hal58th's full-sized avatar

Carl Meyers hal58th

View GitHub Profile
---
# tasks file for aws.ec2_remote_facts
- name: Gather All EC2 facts, but only grab EC2 instances with the tag-Name
ec2_remote_facts:
# you can specify filters here if you want to - maybe set an environment tag in your vault
filters:
vpc-id: "{{ vpc_id }}"
instance-state-name: running
"tag-key": "Name"
aws_secret_key: "{{ aws_secret_key }}"