On 06/26/14 16:06, jepper wrote:
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[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 can do this:

fuseMQ_URL=failover:{% for host in groups['fusemq'] %} tcp://{{ host
}}{% if not loop.last %},{% endif %}{% endfor %}

-- 
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/53AC4C91.1030003%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to