ec2_vol_facts examples?

308 views
Skip to first unread message

m...@wavefront.com

unread,
Oct 1, 2016, 9:24:06 PM10/1/16
to Ansible Project
I need to go through my EC2 fleet and ensure certain tags are applied on ebs volumes. I have a conformance Playbook that goes through all the db nodes.

ansible-playbook -i ec2.py -l tag_role_db db.yml

I'm a little uncertain how I'd go through each host and find all attached volumes and then use ec2_tag to ensure tags.

I think I can use ec2_vol_facts:

- name: gather volume facts
  ec2_vol_facts:
   filters: instance-id: {{ ec2_id }}  

But I'm not sure what's returned or how to use that as a with_items.

Hoping to find some examples or some pointers. 

Christopher Stobie

unread,
Oct 1, 2016, 9:34:50 PM10/1/16
to ansible...@googlegroups.com

You can find out what is contained using debug.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f8b60ae0-d5ac-4ec4-a754-0deea8cf1b15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages