ec2_vol_facts examples?

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.

You can find out what is contained using debug.