concatenate string with all list items

11 views
Skip to first unread message

Fatima Elfakih

unread,
Nov 9, 2018, 3:40:48 AM11/9/18
to ansible...@googlegroups.com
hello
I want to add a string for all item in my list without using "with_item".
any proposition?
Thx

Theo Ouzhinski

unread,
Nov 11, 2018, 6:50:27 PM11/11/18
to Ansible Project
You can use a filter to concatenate a string from a list.  For example,
"{{ my_list | join(' ') }}"


You can read more about filters here.

Theo
Reply all
Reply to author
Forward
0 new messages