aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-08-27 14:02:21 +0000
committerpmikus <pmikus@cisco.com>2021-08-27 14:02:21 +0000
commit4bf3efc45c708370b5d8bc30ae0fb64c671a3877 (patch)
treedf0d13f1f7b6c0957896c3b94de8f34d093ddca4 /fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2
parentbcc8b334d1961894b54c080f3d58032aacb1a048 (diff)
Infra: Cleanup Nomad configs
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ia5c9f0902551de1a63144e6f56dfa6db2895b0b2
Diffstat (limited to 'fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2')
-rw-r--r--fdio.infra.ansible/roles/nomad/templates/consul.hcl.j218
1 files changed, 18 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2 b/fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2
new file mode 100644
index 0000000000..6d30676ca0
--- /dev/null
+++ b/fdio.infra.ansible/roles/nomad/templates/consul.hcl.j2
@@ -0,0 +1,18 @@
+{% if nomad_use_consul | bool == True %}
+consul {
+ # The address to the Consul agent.
+ address = "{{ nomad_consul_address }}"
+ token = "{{ nomad_consul_token }}"
+ # The service name to register the server and client with Consul.
+ server_service_name = "{{ nomad_consul_servers_service_name }}"
+ client_service_name = "{{ nomad_consul_clients_service_name }}"
+ tags = {{ nomad_consul_tags | to_json }}
+
+ # Enables automatically registering the services.
+ auto_advertise = true
+
+ # Enabling the server and client to bootstrap using Consul.
+ server_auto_join = true
+ client_auto_join = true
+}
+{% endif %} \ No newline at end of file