ansible-hashistack/roles/consul/templates/consul.json.j2

31 lines
680 B
Plaintext
Raw Normal View History

2023-09-11 18:31:03 +02:00
{
"datacenter": "{{ consul_dc_name }}",
"node_name": "{{ vm_name }}",
"data_dir": "/opt/consul",
"encrypt": "{{ gossip.stdout }}",
"bind_addr": "{{ vm_ip }}",
"addresses": {
"https": "{{ vm_ip }}",
"http": "{{ vm_ip }}",
"dns": "{{ vm_ip }}",
"grpc": "{{ vm_ip }}"
},
"ports": {
2023-10-06 12:05:33 +02:00
"grpc": 8502
2023-09-11 18:31:03 +02:00
},
{% if 'server' in consul_node_role %}
"server": true,
2023-10-06 12:05:33 +02:00
"bootstrap_expect":3,
{% else %}
"bootstrap_expect":0,
2023-09-11 18:31:03 +02:00
{% endif %}
2023-10-06 12:05:33 +02:00
"retry_join": [{% for host in groups['admin'] %}"{{ hostvars[host]['vm_ip'] }}"{% if not loop.last %},{% endif %}{% endfor %}],
2023-09-11 18:31:03 +02:00
"ui_config": {
"enabled": true
},
"connect": {
"enabled": true
}
}