diff options
author | Alex Auvolat <alex@adnab.me> | 2020-05-21 23:41:39 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-07-15 16:03:42 +0200 |
commit | 207d1fa278bc1cb9e8600779287abaffe2ef7746 (patch) | |
tree | 367eb0afcc7e878c105ad977b85fad738de09dd0 /ansible/roles/consul | |
parent | bee7e10256e0939c1852e4cc3fba1829e0c78c4f (diff) | |
download | infrastructure-207d1fa278bc1cb9e8600779287abaffe2ef7746.tar.gz infrastructure-207d1fa278bc1cb9e8600779287abaffe2ef7746.zip |
Allow external VPN nodes, make multi-DC deployment work
Diffstat (limited to 'ansible/roles/consul')
-rw-r--r-- | ansible/roles/consul/templates/consul.json.j2 | 3 |
1 files changed, 2 insertions, 1 deletions
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": { |