aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/consul/templates/base.hcl.j2
blob: 11743fa4209404da5ca927a3ab7486618d61a958 (plain)
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
node_name = "{{ consul_node_name }}"
datacenter = "{{ consul_datacenter }}"

bind_addr = "{{ consul_bind_addr }}"
client_addr = "{{ consul_client_addr }}"
data_dir = "{{ consul_data_dir }}"

enable_syslog = {{ consul_enable_syslog | bool | lower }}
enable_debug = {{ consul_enable_debug | bool | lower }}
disable_update_check = {{ consul_disable_update_check | bool | lower }}
log_level = "{{ consul_log_level }}"

server = {{ consul_node_server | bool | lower }}
encrypt = "{{ consul_encrypt }}"
{% if consul_node_server | bool == True %}
bootstrap_expect = {{ consul_bootstrap_expect }}
{% endif %}
{% if consul_retry_join | bool -%}
retry_join = [ {% for ip_port in consul_retry_servers -%} "{{ ip_port }}"{% if not loop.last %}, {% endif %}{%- endfor -%} ]
{%- endif %}

ui = {{ consul_ui | bool | lower }}

ca_file = "{{ consul_ca_file }}"
cert_file = "{{ consul_cert_file }}"
key_file = "{{ consul_key_file }}"

{% if consul_recursors -%}
recursors = [ {% for server in consul_recursors -%} "{{ server }}"{% if not loop.last %}, {% endif %}{%- endfor -%} ]
{%- endif %}