try

{{ ":9999,".join(groups['database']) + ':9999' }}




On Sat, Jun 6, 2015 at 8:06 AM, István Szukács <[email protected]> wrote:

> Hi everybody,
>
> I was wondering what is the most idiomatic way of doing the following:
>
> ---
> - name: Install
>   hosts: 'webservers'
>   remote_user: 'centos'
>   roles:
>     - { role: 'webserver', db_conn_string: 'hostA.tld.com:9999,
> hostB.tld.com:9999,hostC.tld.com:9999' }
>
> The db hosts are are called [database] group in the hosts file.
>
> Can I generate the db conn string somehow in the playbook or there is
> better way of achieving this.
>
> Thank you in advance,
> Istvan
>
> --
> 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/12fceea2-ec6e-47a8-8717-482471aea2bd%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/12fceea2-ec6e-47a8-8717-482471aea2bd%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/CAFUV_d5Q8jaJZchq9gPaWM%3DMJvVb4ONN5g_1x3hn53L-eFFheg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to