# parameterized role and with\_dict loop

**URL:** <https://forum.ansible.com/t/parameterized-role-and-with-dict-loop/16929>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [December 1, 2014, 8:03pm UTC](https://forum.ansible.com/t/parameterized-role-and-with-dict-loop/16929 "2014-12-01T20:03:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robb](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@robb](https://forum.ansible.com/u/robb)\
**Post date:** [December 1, 2014, 8:03pm UTC](https://forum.ansible.com/t/parameterized-role-and-with-dict-loop/16929/1 "2014-12-01T20:03:04Z")

</div>

I have a role, route53-healthcheck, which execute a series of command: tasks using the aws cli (Ansible route53 module is for DNS records-only).

I have a dictionary of Application names and metadata in group\_vars/all. I want am trying to loop over the dictionary using with\_dict calling the roll each time with different parameters:

route53-healthchecks.yml

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 1, 2014, 10:14pm UTC](https://forum.ansible.com/t/parameterized-role-and-with-dict-loop/16929/2 "2014-12-01T22:14:19Z")

</div>

Roles cannot be presently used with iterators. This is something the ‘v2/’ subtree may allow at a later date.

Until then, the solution is to apply the loop to each task inside the role that needs to be looped.
