1 {% if nomad_use_consul | bool == True %}
3 # Specifies the address to the local Consul agent, given in the format
5 address = "{{ nomad_consul_address }}"
7 # Specifies if Nomad should advertise its services in Consul. The services
8 # are named according to server_service_name and client_service_name. Nomad
9 # servers and clients advertise their respective services, each tagged
10 # appropriately with either http or rpc tag. Nomad servers also advertise a
11 # serf tagged service.
14 # Specifies if the Nomad clients should automatically discover servers in
15 # the same region by searching for the Consul service name defined in the
16 # server_service_name option. The search occurs if the client is not
17 # registered with any servers or it is unable to heartbeat to the leader of
18 # the region, in which case it may be partitioned and searches for other
20 client_auto_join = true
22 # Specifies the name of the service in Consul for the Nomad clients.
23 client_service_name = "{{ nomad_consul_clients_service_name }}"
25 # Specifies the name of the service in Consul for the Nomad servers.
26 server_service_name = "{{ nomad_consul_servers_service_name }}"
28 # Specifies if the Nomad servers should automatically discover and join
29 # other Nomad servers by searching for the Consul service name defined in
30 # the server_service_name option. This search only happens if the server
31 # does not have a leader.
32 server_auto_join = true
34 # Specifies optional Consul tags to be registered with the Nomad server and
36 tags = {{ nomad_consul_tags | to_json }}
38 # Specifies the token used to provide a per-request ACL token. This option
39 # overrides the Consul Agent's default token. If the token is not set here
40 # or on the Consul agent, it will default to Consul's anonymous policy,
41 # which may or may not allow writes.
42 token = "{{ nomad_consul_token }}"
44 {% if nomad_consul_use_ssl | bool == True -%}
45 # Specifies if the transport scheme should use HTTPS to communicate with the
49 # Specifies an optional path to the CA certificate used for Consul
50 # communication. This defaults to the system bundle if unspecified.
51 ca_file = "{{ nomad_ca_file }}"
53 # Specifies the path to the certificate used for Consul communication. If
54 # this is set then you need to also set key_file.
55 cert_file = "{{ nomad_cert_file }}"
57 # Specifies the path to the private key used for Consul communication. If
58 # this is set then you need to also set cert_file.
59 key_file = "{{ nomad_key_file }}"