Super. Thanks for your quick reply. Exactly what I needed
Alain
Le lundi 15 septembre 2014 13:12:44 UTC+2, Serge van Ginderachter a écrit :
>
> something like
>
> {% for cmd in tester_commands_root_extra %}{{ cmd }}{% if not loop.last
> %}, {% endif %}{% endfor %}
>
> On 15 September 2014 12:54, Alainkr <[email protected] <javascript:>>
> wrote:
>
>> Hello,
>>
>> I'm trying to build a String based on host vars from a group.
>>
>> I see how to loop thru host in a group
>>
>> {% for host in groups['app_servers'] %}
>> {{ hostvars[host]['my_cool_var'] }}
>> {% endfor %}
>>
>> But not how to flatten this into a string to get :
>>
>> my_cool_val1, my_cool_val2,...,my_cool_vallast
>>
>> Thanks for you help
>>
>>
>> Alain
>>
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/8d20763f-d6c7-4383-b11c-ce06e5391999%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/8d20763f-d6c7-4383-b11c-ce06e5391999%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/c99a4965-f590-4b0b-9e5b-b719de3e25c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.