mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-10-05 14:04:44 +02:00
Update to 2025-09-29 18:00
This commit is contained in:
@@ -36,6 +36,11 @@ consul_base_conf:
|
|||||||
# An optional alternative domain
|
# An optional alternative domain
|
||||||
# alt_domain: consul.example.org.
|
# alt_domain: consul.example.org.
|
||||||
|
|
||||||
|
# dns_config:
|
||||||
|
# service_ttl:
|
||||||
|
# '*': 5s
|
||||||
|
# node_ttl: 5s
|
||||||
|
|
||||||
# Address that is advertised to the other nodes
|
# Address that is advertised to the other nodes
|
||||||
advertise_addr: "{{ ansible_default_ipv4.address }}"
|
advertise_addr: "{{ ansible_default_ipv4.address }}"
|
||||||
# You can also advertise the WAN addr
|
# You can also advertise the WAN addr
|
||||||
|
@@ -89,6 +89,33 @@ recursors = [
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{% if consul_conf.dns_config is defined %}
|
||||||
|
dns_config {
|
||||||
|
{% if consul_conf.dns_config.service_ttl is defined %}
|
||||||
|
service_ttl {
|
||||||
|
{% for service in consul_conf.dns_config.service_ttl.keys() | list %}
|
||||||
|
"{{ service }}" = "{{ consul_conf.dns_config.service_ttl[service] }}"
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% for key in ["allow_stale", "enable_truncate", "only_passing", "enable_additional_node_meta_txt", "use_cache"] %}
|
||||||
|
{% if consul_conf.dns_config[key] is defined %}
|
||||||
|
{{ key }} = {{ (consul_conf.dns_config[key]) | ternary('true', 'false') }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% for key in ["a_record_limit"] %}
|
||||||
|
{% if consul_conf.dns_config[key] is defined %}
|
||||||
|
{{ key }} = {{ (consul_conf.dns_config[key]) }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% for key in ["node_ttl", "max_stale", "recursor_strategy", "recursor_timeout", "cache_max_age"] %}
|
||||||
|
{% if consul_conf.dns_config[key] is defined %}
|
||||||
|
{{ key }} = "{{ consul_conf.dns_config[key] }}"
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if consul_conf.domain is defined %}
|
{% if consul_conf.domain is defined %}
|
||||||
domain = "{{ consul_conf.domain }}"
|
domain = "{{ consul_conf.domain }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user