{% if nomad_node_server | bool == True %} server { enabled = {{ nomad_node_server | bool | lower }} {% if nomad_node_server | bool -%} bootstrap_expect = {{ nomad_bootstrap_expect }} {%- endif %} {% if nomad_node_server | bool -%} raft_protocol = 3 {%- endif %} {% if nomad_authoritative_region is defined %} authoritative_region = "{{ nomad_authoritative_region }}" {% endif %} {% if nomad_use_consul == False %} {% if nomad_retry_join | bool -%} retry_join = [ {%- set comma = joiner(",") -%} {% for server in nomad_servers -%} {{ comma() }}"{{ hostvars[server]['nomad_advertise_address'] | ipwrap }}" {%- endfor -%} ] retry_max = {{ nomad_retry_max }} retry_interval = "{{ nomad_retry_interval }}" {% else -%} start_join = [ {%- set comma = joiner(",") -%} {% for server in nomad_servers -%} {{ comma() }}"{{ hostvars[server]['nomad_advertise_address'] | ipwrap }}" {%- endfor -%} ] {%- endif %} {% endif %} encrypt = "{{ nomad_encrypt | default('') }}" {% 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 %} } {% endif %}