Created
August 22, 2016 14:50
-
-
Save josnidhin/c57e2cc585d99e25cb3b234b703aad11 to your computer and use it in GitHub Desktop.
The ansible script to find ec2 instances with certain tags and terminate them. Does not uses ec2 dynamic inventory script.
They have renamed facts to info.
- name: collect list of node instances
amazon.aws.ec2_instance_info:
region: "{{ region }}"
filters:
"tag:Role": "node"
"tag:Vpc": "{{ vpc_name }}"
register: ec2_list
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As with latest version of ansible this is working for me searching by the Name tag but could be any key.