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,).
------------------
# site.yml
vars:
var_in_playbook: bar
roles:
# this works
- { role: test, my_role_var: "{{ var_in_playbook }}" }
# this doesn't
- { role: test, my_role_var: "{{ var_in_group_vars }}" }
------------------
Is there any workaround to this issue?