# ec2\_vol\_facts examples?

**URL:** <https://forum.ansible.com/t/ec2-vol-facts-examples/22697>\
**Category:** Ansible Project\
**Created:** [October 1, 2016, 8:33am UTC](https://forum.ansible.com/t/ec2-vol-facts-examples/22697 "2016-10-01T08:33:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrz](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mrz](https://forum.ansible.com/u/mrz)\
**Post date:** [October 1, 2016, 8:33am UTC](https://forum.ansible.com/t/ec2-vol-facts-examples/22697/1 "2016-10-01T08:33:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Christopher\_Stobie](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@Christopher\_Stobie](https://forum.ansible.com/u/Christopher_Stobie)\
**Post date:** [October 2, 2016, 1:34am UTC](https://forum.ansible.com/t/ec2-vol-facts-examples/22697/2 "2016-10-02T01:34:41Z")

</div>

You can find out what is contained using debug.
