diff options
author | pmikus <pmikus@cisco.com> | 2020-05-22 14:46:43 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-05-22 14:52:10 +0000 |
commit | 216073ac4b05619d9e9fc73131075597196af753 (patch) | |
tree | 3d5976c760a434c346575be598a1362a1a0f664e /resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 | |
parent | ae80dfa4c98049d96163b6ad3d67221a7851ba4b (diff) |
Infra: Ansible Nomad II
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Iaa5c02d14223b578c316f48e31a0b3613303eecf
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 b/resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 index c28a43c5d2..b581de9ad0 100644 --- a/resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 +++ b/resources/tools/testbed-setup/ansible/roles/nomad/templates/server.hcl.j2 @@ -1,4 +1,16 @@ server { - enabled = false - encrypt = "Y4T+5JGx1C3l2NFBBvkTWQ==" + enabled = {{ nomad_node_server | bool | lower }} + + {% if nomad_node_server | bool -%} + bootstrap_expect = {{ nomad_bootstrap_expect }} + {%- endif %} + + encrypt = "{{ nomad_encrypt }}" + + {% if nomad_retry_join | bool -%} + server_join { + retry_join = [ {% for ip_port in nomad_retry_servers -%} "{{ ip_port }}" {% if not loop.last %},{% endif %}{%- endfor -%} ] + } + {%- endif %} + } |