mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2022-09-04 18:00
This commit is contained in:
@@ -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 %}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user