Mostly i was thinking for the use of in templates, the only other
thing i can think of is using 'intermediate vars' to keep reusable
expressions and then creating their input when needed:

- play:
  vars:
      merged_list: "{{ (lookup('vars', *query('varnames',
merge_pattern$')) + [testlist_initial_value]) |
flatten(levels=merge_flatten_levels|default(1)) }}"
....

 -  name: also works with 'vars' in other scopes, using set_fact to
get 'static value'
   set_fact:
       mylist: '{{merged_list}}'
   vars:
     testlist_initial_value: [10,11]
     merge_pattern: '^.+_merge_list'
      a_merge_list: [1,2,3]
      b_merge_list: [4,5,6]


-- 
----------
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CACVha7c1aBURhLfx9sNYcXn_gqAodJdEcyC2KBKQxu%2BreUCYzA%40mail.gmail.com.

Reply via email to