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

31 lines
720 B
Plaintext
Raw Permalink 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 }} 127.0.0.1",
"http": "{{ vm_ip }} 127.0.0.1",
"dns": "{{ vm_ip }} 127.0.0.1",
"grpc": "{{ vm_ip }} 127.0.0.1"
2023-09-11 18:31:03 +02:00
},
"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
}
}