On Thursday, 23 November 2017 07.44.29 CET
b...@tanners.org wrote:
> Is there a way to concatenate variables?
Since you variable contains a list you can use the union filter
https://docs.ansible.com/ansible/latest/playbooks_filters.html
But this will remove duplicates or just use +.
> base:
> - a
> - b
> - c
>
> extend:
> - x
> - y
> - z
>
> Something like this?
>
> together:
> - "{{ base }""
> - extend
>
> The above gives me
>
> "msg": "together [[u'a', u'b', u'c'], u'x', u'y', u'z']"
{{ base | union(extend) }}
{{ base + extend }}
--
Kai Stian Olstad