aboutsummaryrefslogtreecommitdiff
path: root/os/config/roles/consul/templates/consul.json.j2
blob: 76632a6383463b30555e2247c2f8162dd0c5bf84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  "data_dir": "/var/lib/consul",
  "bind_addr": "0.0.0.0",
  "advertise_addr": "{{ ipv4 }}",
  "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]['ipv4'] }}" {{ "," if not loop.last else "" }}
   {% endfor %}
  ],
  "bootstrap_expect": 3,
  "server": true,
  "ui": true,
  "ports": {
     "dns": 53
  },
  "recursors": [
    "{{ dns_server }}"
  ],
  "encrypt": "{{ consul_gossip_encrypt }}",
  "domain": "2.cluster.deuxfleurs.fr",
  "performance": {
    "raft_multiplier": 10,
    "rpc_hold_timeout": "30s",
    "leave_drain_time": "30s"
  }
}