fix(ip6scale): Unify rnd profiles
[csit.git] / fdio.infra.ansible / roles / nomad / templates / server.hcl.j2
1 {% if nomad_node_server | bool == True %}
2 server {
3     enabled = {{ nomad_node_server | bool | lower }}
4
5     {% if nomad_node_server | bool -%}
6         bootstrap_expect = {{ nomad_bootstrap_expect }}
7     {%- endif %}
8
9     {% if nomad_node_server | bool -%}
10         raft_protocol = 3
11     {%- endif %}
12
13     {% if nomad_authoritative_region is defined %}
14         authoritative_region = "{{ nomad_authoritative_region }}"
15     {% endif %}
16
17 {% if nomad_use_consul == False %}
18     {% if nomad_retry_join | bool -%}
19         retry_join = [
20             {%- set comma = joiner(",") -%}
21             {% for server in nomad_servers -%}
22                 {{ comma() }}"{{ hostvars[server]['nomad_advertise_address'] | ipwrap }}"
23             {%- endfor -%} ]
24         retry_max = {{ nomad_retry_max }}
25         retry_interval = "{{ nomad_retry_interval }}"
26     {% else -%}
27         start_join = [
28             {%- set comma = joiner(",") -%}
29             {% for server in nomad_servers -%}
30                 {{ comma() }}"{{ hostvars[server]['nomad_advertise_address'] | ipwrap }}"
31             {%- endfor -%} ]
32     {%- endif %}
33 {% endif %}
34
35     encrypt = "{{ nomad_encrypt | default('') }}"
36
37     {% if nomad_node_gc_threshold -%}
38         node_gc_threshold = "{{ nomad_node_gc_threshold }}"
39     {%- endif %}
40
41     {% if nomad_job_gc_interval -%}
42         job_gc_interval = "{{ nomad_job_gc_interval }}"
43     {%- endif %}
44
45     {% if nomad_job_gc_threshold -%}
46         job_gc_threshold = "{{ nomad_job_gc_threshold }}"
47     {%- endif %}
48
49     {% if nomad_eval_gc_threshold -%}
50         eval_gc_threshold = "{{ nomad_eval_gc_threshold }}"
51     {%- endif %}
52
53     {% if nomad_deployment_gc_threshold -%}
54         deployment_gc_threshold = "{{ nomad_deployment_gc_threshold }}"
55     {%- endif %}
56
57 }
58 {% endif %}