Infra: Ansible sync
[csit.git] / resources / tools / testbed-setup / ansible / roles / nomad / templates / client.hcl.j2
index 91fd1c9..f245697 100644 (file)
@@ -3,8 +3,12 @@ client {
     no_host_uuid = {{ nomad_no_host_uuid | bool | lower }}
     node_class = "{{ nomad_node_class }}"
 
+    {% if nomad_cpu_total_compute is defined -%}
+    cpu_total_compute = {{ nomad_cpu_total_compute }}
+    {% endif -%}
+
     {% if nomad_servers -%}
-    servers = [ {{ nomad_servers }} ]
+    servers = [ {% for ip_port in nomad_servers -%} "{{ ip_port }}" {% if not loop.last %},{% endif %}{%- endfor -%} ]
     {% endif %}
 
     {% if nomad_options -%}
@@ -15,4 +19,13 @@ client {
     }
     {% endif %}
 
+    {% if nomad_volumes -%}
+    {% for volume in nomad_volumes -%}
+    host_volume "{{ volume.name }}" {
+        path = "{{ volume.path }}"
+        read_only = {{ volume.read_only | bool | lower }}
+    }
+    {% endfor -%}
+    {% endif %}
+
 }