How to join list in Yml

16 views
Skip to first unread message

Micael Malta

unread,
Dec 8, 2014, 12:40:37 PM12/8/14
to ansible...@googlegroups.com
i have to get dynamic variables in config:

list: [1,2,3]

variable: 
  - { name: myname, "{{ list | join(",") }}" }


How to do that ?

Toshio Kuratomi

unread,
Dec 10, 2014, 10:42:48 AM12/10/14
to ansible...@googlegroups.com

Not sure I understand the question.  {{ list|join(",")}} will join a list using jinja2 which is available in playbooks. But you already wrote that so you know that already...

Could you clarify?

-Toshio

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5273993e-70ba-4ad9-b349-b57847a3304c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages