aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/consul
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/consul')
-rw-r--r--ansible/roles/consul/templates/consul.json.j23
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": {