Try the join filter in Jinja:

{{ groups['fusemq']|join(' ,') }}



2014-06-26 15:06 GMT+02:00 jepper <[email protected]>:

> In a template, I loop over a group of fusemq hosts defined in my invetory
> file e.g.
>
> fuseMQ_URL=failover:( {% for host in groups['fusemq'] %} tcp://{{ host }},
> {% endfor %} )
>
> The result is of course, a trailing comma - how can I avoid this?
>
> fuseMQ_URL=failover:(  tcp://fusemq01, tcp://fusemq02,  )
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8718c489-3551-41e8-a1e7-4a73cfa461d4%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8718c489-3551-41e8-a1e7-4a73cfa461d4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH%3DpYWKbc4GdDc8YfKqLgR8dxbNHSS660xfFFZTeWPqpZ8T4Rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to