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?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/524fa212-1bcf-428b-bbcd-0d163ef76096%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to