From 207d1fa278bc1cb9e8600779287abaffe2ef7746 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 21 May 2020 23:41:39 +0200 Subject: Allow external VPN nodes, make multi-DC deployment work --- ansible/roles/consul/templates/consul.json.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ansible/roles/consul') diff --git a/ansible/roles/consul/templates/consul.json.j2 b/ansible/roles/consul/templates/consul.json.j2 index 4a36dc2..a98175c 100644 --- a/ansible/roles/consul/templates/consul.json.j2 +++ b/ansible/roles/consul/templates/consul.json.j2 @@ -1,4 +1,5 @@ { + "datacenter": "deuxfleurs", "data_dir": "/var/lib/consul", "bind_addr": "0.0.0.0", "advertise_addr": "{{ vpn_ip }}", @@ -11,7 +12,7 @@ "{{ hostvars[selected_host]['vpn_ip'] }}" {{ "," if not loop.last else "" }} {% endfor %} ], - "bootstrap_expect": 3, + "bootstrap_expect": {{ groups['cluster_nodes']|length }}, "server": true, "ui": true, "ports": { -- cgit v1.2.3