Infra: Ansible Nomad
[csit.git] / resources / tools / testbed-setup / ansible / roles / nomad / templates / client.hcl.j2
diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2 b/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2
new file mode 100644 (file)
index 0000000..91fd1c9
--- /dev/null
@@ -0,0 +1,18 @@
+client {
+    enabled = {{ nomad_node_client | bool | lower }}
+    no_host_uuid = {{ nomad_no_host_uuid | bool | lower }}
+    node_class = "{{ nomad_node_class }}"
+
+    {% if nomad_servers -%}
+    servers = [ {{ nomad_servers }} ]
+    {% endif %}
+
+    {% if nomad_options -%}
+    options = {
+    {% for key, value in nomad_options.items() %}
+    "{{ key }}" = "{{ value }}"
+    {% endfor -%}
+    }
+    {% endif %}
+
+}