Hi
I’m trying to write playbook to deploy automatically a Galera Cluster. I’ve been googling before ask help and I found some interesting info about Vagrantfile and multi machine scenario.
My main problem is until now I have never worked with vagrant multiple machines (3 nodes) and Ansible. I just want to deploy 3 nodes with Vagrant and then make the provision with Ansible. My current code does well the easies part of the work
- 3 nodes are deployed with Vagrantfile: https://gist.github.com/rubendob/ed0d756bd1b3dc00dd2b
- then I run playbook.yml to do some task, by now are just few: install percona key, update cache and install pxc into each node
the problem I have is I don’t know how set some variables into my.cnf.j2 jinja template
wsrep_node_address = {{ ansible_eth1.ipv4.address }}
bind_address = {{ galera_conf[‘bind_address’] }}
for example, I have no problem with this two variables, one is a fact and other I have it on defaults/main.yml but what about this one?
wsrep_cluster_address = gcomm://ip1,ip2,ip3
I just don’t know how to setup this parameter. Do I have to use groups of inventory file? Where I can find the values of my galera cluster nodes? From inventory? From Vagrantfile? And how I can make to ansible write it in a right way?
Thanks