Hi!

I stumbled onto the following.

While this works:

- hosts: all

  roles:
    - { role: foo, data: 'bar' }
    - { role: foo, data: 'zab' }


this will fail right away with "value of 'roles:' must be a list":

- hosts: all
  vars:
    my_data:
      - { role: foo, data: 'bar' }
      - { role: foo, data: 'zab' }

  roles: my_data


So it makes a difference if the list of roles is provided verbatim or 
assigned to a variable first. This is especially surprising as this pattern 
works well with e.g. "with_items" where the list being looped can be either 
verbatim or a variable.

Is this an intended limitation or a bug?

Why do I need this? I want to load the variable from another file using 
"include_vars".

Cheers,
Henning

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ba502beb-02b0-451e-bafc-668d28d88ced%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to