# interpolated parameterized role dependencies

**URL:** <https://forum.ansible.com/t/interpolated-parameterized-role-dependencies/16520>\
**Category:** Ansible Project\
**Created:** [October 15, 2014, 5:34pm UTC](https://forum.ansible.com/t/interpolated-parameterized-role-dependencies/16520 "2014-10-15T17:34:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexahnhome](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@alexahnhome](https://forum.ansible.com/u/alexahnhome)\
**Post date:** [October 15, 2014, 5:34pm UTC](https://forum.ansible.com/t/interpolated-parameterized-role-dependencies/16520/1 "2014-10-15T17:34:20Z")

</div>

Hey guys, first of all, I think Ansible is a great project. In my most recent project, I’ve started to explore the various ways to manage configurations, and one of the schemes that I wanted to explore was using parameterized role dependencies. Essentially, the setup of the problem is similar to: [https://github.com/sivel/ansible-training-content/blob/master/advanced/chapter\_08.yml#L105](https://github.com/sivel/ansible-training-content/blob/master/advanced/chapter_08.yml#L105)  
When I define a role, I’d like to be able to define inside meta/main.yml, not only the dependencies, but also the parameters passed into the dependencies (interpolated). Here is an example: [http://pastebin.com/rwmnke9V](http://pastebin.com/rwmnke9V)  
I have set hash\_behavior to merge because I want to essentially pass in a dictionary to each role dependency (which houses the parameters they need to function).  
Ansible errors out with: AttributeError: ‘unicode’ object has no attribute ‘iteritems’  
What’s strange is that this sort of interpolation works within playbooks, in that I can use the exact same syntax to be able to pass dictionary values into roles for plays. Is this a use case that ansible can satisfy, and/or am I doing something wrong? Thanks for reading!

---

<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:** [October 20, 2014, 9:17pm UTC](https://forum.ansible.com/t/interpolated-parameterized-role-dependencies/16520/2 "2014-10-20T21:17:29Z")

</div>

I think the best thing here is to file a minimal reproducer in GitHub that shows how to reproduce your unicode error, it is probably not explicitly a role dependency thing but something we just need to handle.

Be sure your Ansible version is at least 1.7.2 before filing.

Thanks!
