Update to 2022-09-04 18:00

This commit is contained in:
Daniel Berteaud
2022-09-04 18:00:17 +02:00
parent c36a80b596
commit e084a5f0b2
10 changed files with 124 additions and 9 deletions

View File

@@ -167,18 +167,40 @@ telemetry {
}
consul {
{% if nomad_conf.consul.address is defined %}
address = "{{ nomad_conf.consul.address }}"
{% for key in ['address', 'auth', 'client_service_name', 'server_service_name', 'grpc_address', 'token'] %}
{% if nomad_conf.consul[key] is defined %}
{{ key }} = "{{ nomad_conf.consul[key] }}"
{% endif %}
{% if nomad_conf.consul.allow_unauthenticated is defined %}
allow_unauthenticated = {{ nomad_conf.consul.allow_unauthenticated | ternary('true', 'false') }}
{% endfor %}
{% for key in ['allow_unauthenticated', 'auto_advertise', 'checks_use_advertise', 'server_auto_join'] %}
{% if nomad_conf.consul[key] is defined %}
{{ key }} = {{ nomad_conf.consul[key] | ternary('true', 'false') }}
{% endif %}
{% endfor %}
{% if nomad_conf.consul.tags is defined and nomad_conf.consul.tags is iterable %}
tags = [
{% for tag in nomad_conf.consul.tags %}
"{{ tag }}"
]
"{{ tag }}",
{% endfor %}
]
{% endif %}
{% if nomad_conf.consul.ssl %}
ssl = true
{% for key in ['ca_file', 'cert_file', 'key_file'] %}
{% if nomad_conf.consul[key] is defined %}
{{ key }} = "{{ nomad_conf.consul[key] }}"
{% endif %}
{% endfor %}
{% for key in ['verify_ssl', 'share_ssl'] %}
{% if nomad_conf.consul[key] is defined %}
{{ key }} = {{ nomad_conf.consul[key] | ternary('true', 'false') }}
{% endif %}
{% endfor %}
{% endif %}
}