aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/consul/templates/consul.json.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/consul/templates/consul.json.j2')
-rw-r--r--ansible/roles/consul/templates/consul.json.j26
1 files changed, 3 insertions, 3 deletions
diff --git a/ansible/roles/consul/templates/consul.json.j2 b/ansible/roles/consul/templates/consul.json.j2
index b6c86aa..4a36dc2 100644
--- a/ansible/roles/consul/templates/consul.json.j2
+++ b/ansible/roles/consul/templates/consul.json.j2
@@ -1,14 +1,14 @@
{
"data_dir": "/var/lib/consul",
"bind_addr": "0.0.0.0",
- "advertise_addr": "{{ public_ip }}",
+ "advertise_addr": "{{ vpn_ip }}",
"addresses": {
"dns": "0.0.0.0",
"http": "0.0.0.0"
},
"retry_join": [
- {% for selected_host in groups['cluster_nodes']|reject("sameas", ansible_fqdn) %}{# @FIXME: Reject doesn't work #}
- "{{ hostvars[selected_host]['private_ip'] }}" {{ "," if not loop.last else "" }}
+ {% for selected_host in groups['cluster_nodes']|difference([inventory_hostname]) %}{# @FIXME: Reject doesn't work #}
+ "{{ hostvars[selected_host]['vpn_ip'] }}" {{ "," if not loop.last else "" }}
{% endfor %}
],
"bootstrap_expect": 3,