From 854d8fcb00be720e06dbf795140e31c4e66ca0cb Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 3 Apr 2022 20:41:19 +0200 Subject: [PATCH] add nomad client --- templates/config.hcl.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/config.hcl.j2 b/templates/config.hcl.j2 index 0317ea3..4018291 100644 --- a/templates/config.hcl.j2 +++ b/templates/config.hcl.j2 @@ -3,7 +3,7 @@ bind_addr = "{{ nomad_bind_addr }}" datacenter = "{{ nomad_datacenter }}" server { - enabled = true +enabled = {{ nomad_server |lower }} bootstrap_expect = {{ nomad_bootstrap_expect }} } @@ -26,8 +26,10 @@ vault { enabled = true address = "{{ nomad_vault_address}}" create_from_role = "{{ nomad_vault_role }}" + {% if nomad_server %} token = "{{ nomad_vault_token }}" namespace = "{{ nomad_vault_namespace}}" task_token_ttl = "{{ nomad_vault_token_ttl }}" + {% endif %} } {% endif %}