-
Notifications
You must be signed in to change notification settings - Fork 161
/
client.hcl.j2
53 lines (44 loc) · 1.5 KB
/
client.hcl.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
client {
enabled = {{ _nomad_node_client | bool | lower }}
node_class = "{{ nomad_node_class }}"
no_host_uuid = {{ nomad_no_host_uuid | bool | lower }}
{% if nomad_use_consul == False %}
servers = [
{%- set comma = joiner(",") -%}
{%- for server in nomad_servers -%}
{{ comma() }}"{{ hostvars[server]['nomad_advertise_address'] | ipwrap }}"
{%- endfor -%} ]
{% endif %}
max_kill_timeout = "{{ nomad_max_kill_timeout }}"
{% if nomad_network_interface is defined -%}
network_interface = "{{ nomad_network_interface }}"
{% endif -%}
network_speed = {{ nomad_network_speed }}
cpu_total_compute = {{ nomad_cpu_total_compute }}
gc_interval = "{{ nomad_gc_interval }}"
gc_disk_usage_threshold = {{ nomad_gc_disk_usage_threshold }}
gc_inode_usage_threshold = {{ nomad_gc_inode_usage_threshold }}
gc_parallel_destroys = {{ nomad_gc_parallel_destroys }}
reserved {
cpu = {{ nomad_reserved['cpu'] }}
memory = {{ nomad_reserved['memory'] }}
disk = {{ nomad_reserved['disk'] }}
}
{% if nomad_chroot_env != False -%}
chroot_env = {{ nomad_chroot_env | to_nice_json }}
{% endif %}
{% if nomad_options -%}
options = {
{% for key, value in nomad_options.items() %}
"{{ key }}" = "{{ value }}"
{% endfor -%}
}
{% endif %}
{% if nomad_meta -%}
meta = {
{% for key, value in nomad_meta.items() %}
"{{ key }}" = "{{ value }}"
{% endfor -%}
}
{% endif %}
}