# How to pass group vars to role in playbook?

**URL:** <https://forum.ansible.com/t/how-to-pass-group-vars-to-role-in-playbook/18351>\
**Category:** Ansible Project\
**Created:** [May 30, 2015, 11:08am UTC](https://forum.ansible.com/t/how-to-pass-group-vars-to-role-in-playbook/18351 "2015-05-30T11:08:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan4](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Dan4](https://forum.ansible.com/u/Dan4)\
**Post date:** [May 30, 2015, 11:08am UTC](https://forum.ansible.com/t/how-to-pass-group-vars-to-role-in-playbook/18351/1 "2015-05-30T11:08:54Z")

</div>

When test\_var is defined inside the playbook it gets passed to the role correctly. However when it’s defined in group\_vars/all.yml Ansilbe won’t find it (undefined) and exits with an error:

fatal: [vagrant] =\> failed to combine variables, expected dicts but got a ‘dict’ and a ‘unicode’

The unicode parameter is actually (Undefined,).
