aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/nomad/templates/server.hcl.j2
blob: 5ccf45c1ac83c95c9d96cd694978d7242d4da446 (plain)
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
server {
    enabled = {{ nomad_node_server | bool | lower }}

    {% if nomad_node_server | bool -%}
        bootstrap_expect = {{ nomad_bootstrap_expect }}
    {%- endif %}

    encrypt = "{{ nomad_encrypt }}"

    {% if nomad_node_gc_threshold -%}
        node_gc_threshold = "{{ nomad_node_gc_threshold }}"
    {%- endif %}

    {% if nomad_job_gc_interval -%}
        job_gc_interval = "{{ nomad_job_gc_interval }}"
    {%- endif %}

    {% if nomad_job_gc_threshold -%}
        job_gc_threshold = "{{ nomad_job_gc_threshold }}"
    {%- endif %}

    {% if nomad_eval_gc_threshold -%}
        eval_gc_threshold = "{{ nomad_eval_gc_threshold }}"
    {%- endif %}

    {% if nomad_deployment_gc_threshold -%}
        deployment_gc_threshold = "{{ nomad_deployment_gc_threshold }}"
    {%- endif %}

    {% if nomad_retry_join | bool -%}
    server_join {
        retry_join = [ {% for ip_port in nomad_retry_servers -%} "{{ ip_port }}" {% if not loop.last %},{% endif %}{%- endfor -%} ]
    }
    {%- endif %}

}