Append to lists

17 views
Skip to first unread message

Martin Devlin

unread,
May 14, 2014, 4:33:30 PM5/14/14
to ansible...@googlegroups.com
Why can't I append to a list of the same name depending on what groups a node is in?

For example:

group_vars/chocolate contains:

sauces:
  - name : chocolate
    value : yummy

group_vars/strawberry contains:

sauces:
  - name : strawberry
    value : even_yummier

If a node is in both groups I can't iterate over the sauces list and get both values. This is also the case with hash_behaviour = merge.

What am I doing wrong?

Reply all
Reply to author
Forward
0 new messages