Ansible git move
[csit.git] / fdio.infra.ansible / roles / nomad / templates / client.hcl.j2
1 client {
2     enabled = {{ nomad_node_client | bool | lower }}
3     no_host_uuid = {{ nomad_no_host_uuid | bool | lower }}
4     node_class = "{{ nomad_node_class }}"
5
6     {% if nomad_cpu_total_compute is defined -%}
7     cpu_total_compute = {{ nomad_cpu_total_compute }}
8     {% endif -%}
9
10     {% if nomad_servers -%}
11     servers = [ {% for ip_port in nomad_servers -%} "{{ ip_port }}" {% if not loop.last %},{% endif %}{%- endfor -%} ]
12     {% endif %}
13
14     {% if nomad_options -%}
15     options = {
16     {% for key, value in nomad_options.items() %}
17     "{{ key }}" = "{{ value }}"
18     {% endfor -%}
19     }
20     {% endif %}
21
22     {% if nomad_volumes -%}
23     {% for volume in nomad_volumes -%}
24     host_volume "{{ volume.name }}" {
25         path = "{{ volume.path }}"
26         read_only = {{ volume.read_only | bool | lower }}
27     }
28     {% endfor -%}
29     {% endif %}
30
31 }