I knew about that part, but from there how do you extract IP addresses from 
that list of hosts and put them in a string concatenated by a comma?

On Wednesday, July 1, 2015 at 8:06:12 PM UTC+2, Brian Coca wrote:
>
> you could 
>
> set_fact: mypeers={{ groups['gluster']|difference([inventory_hostname])}} 
>
> On Wed, Jul 1, 2015 at 10:20 AM, Strahinja Kustudić 
> <[email protected] <javascript:>> wrote: 
> > I'm not even sure how to name this thread, but hopefully from the 
> example 
> > you will understand what I mean. 
> > 
> > I was reading this article 
> > 
> https://medium.com/@jmarhee/deploying-a-glusterfs-storage-cluster-with-ansible-on-digitalocean-14dacd721e23
>  
> > and in the middle of the article below the "Creating the cluster" title 
> > there is a playbook with 3 plays, one for each host in the cluster, 
> where in 
> > each play the current host IP address is excluded. The reason why I hate 
> > this solution, is because if tomorrow you would like to add one more 
> node to 
> > the cluster, besides adding the new node to the appropriate group, you 
> would 
> > need to edit every task of that playbook and add a new play for the new 
> > node, which is anything but simple. 
> > 
> > On IRC in the #ansible channel halberom gave a nice solution to this 
> problem 
> > https://gist.github.com/halberom/72b70a8cba934b9d58b9, but it feels 
> sort of 
> > like a hack and that it should be easier to accomplish something like 
> this 
> > in Ansible. 
> > 
> > Is there an easier solution (e.g. using with_items/when), and if not 
> maybe 
> > there should be? 
> > 
> > -- 
> > 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/d1c4f82e-38cd-4f30-a443-a1683ccdaf94%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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/ca2cdace-fbab-4110-8643-a1aa295b11e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to