Always template a localhost config when server

If the galera_client role is templating its config file on a galera
server host it should always use a localhost address.

Change-Id: I468b171c1e72697ea6450fe08aa0acb3faf91201
This commit is contained in:
Jimmy McCrory 2017-12-13 09:57:37 -08:00
parent 5d2988c938
commit a50ecdac0f
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,10 @@
# {{ ansible_managed }}
[client]
host={{ galera_address }}
host={% if inventory_hostname in galera_cluster_members %}
127.0.0.1
{% else %}
{{ galera_address }}
{% endif %}
user={{ galera_root_user }}
password={{ galera_root_password }}

View File

@ -1,2 +1,4 @@
[all]
localhost
[galera_all]