This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/ansible/roles/consul/templates/consul.json.j2

32 lines
800 B
Text
Raw Permalink Normal View History

2019-06-01 14:02:49 +00:00
{
"datacenter": "deuxfleurs",
2019-06-01 14:02:49 +00:00
"data_dir": "/var/lib/consul",
"bind_addr": "0.0.0.0",
2020-05-21 13:27:09 +00:00
"advertise_addr": "{{ vpn_ip }}",
2019-06-01 14:02:49 +00:00
"addresses": {
"dns": "0.0.0.0",
"http": "0.0.0.0"
},
"retry_join": [
2020-05-21 13:27:09 +00:00
{% 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 "" }}
2019-06-01 14:02:49 +00:00
{% endfor %}
],
"bootstrap_expect": {{ groups['cluster_nodes']|length }},
2019-06-01 14:02:49 +00:00
"server": true,
"ui": true,
"ports": {
"dns": 53
},
"recursors": [
"{{ dns_server }}"
],
2019-06-01 14:02:49 +00:00
"encrypt": "{{ consul_gossip_encrypt }}",
"domain": "2.cluster.deuxfleurs.fr",
"performance": {
"raft_multiplier": 10,
"rpc_hold_timeout": "30s",
"leave_drain_time": "30s"
}
}