31 lines
720 B
Django/Jinja
31 lines
720 B
Django/Jinja
{
|
|
"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"
|
|
},
|
|
"ports": {
|
|
"grpc": 8502
|
|
},
|
|
{% if 'server' in consul_node_role %}
|
|
"server": true,
|
|
"bootstrap_expect":3,
|
|
{% else %}
|
|
"bootstrap_expect":0,
|
|
{% endif %}
|
|
|
|
"retry_join": [{% for host in groups['admin'] %}"{{ hostvars[host]['vm_ip'] }}"{% if not loop.last %},{% endif %}{% endfor %}],
|
|
"ui_config": {
|
|
"enabled": true
|
|
},
|
|
"connect": {
|
|
"enabled": true
|
|
}
|
|
}
|