Given a list of variable names, I want to look them up and return a list of their values.
Writing such a list manually is tedious and somewhat less readable:
my_list:
- "{{ foo }}"
- "{{ bar }}"
# ...
It's possible to write it with just one pair of {{ }}
, but then it results in a potentially very long, single-line expression.
mylist: "{{ [foo, bar, ...] }}"