1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/geo_dns/templates/geo.yml.j2
Kristian Klausen f5475cae20
Enable HTTP/3 for the mirrors
pacman/curl does not utilize HTTP/3, but it makes sense to enable
regardless to ensure consistency.

We self-host the authoritative nameservers for the geo domains, so the
configuration has been tweaked to add the HTTPS DNS record for each geo
domain.

Ref #606
2024-10-06 00:59:31 +02:00

41 lines
2.0 KiB
Django/Jinja

#jinja2:lstrip_blocks: True
domains:
{% for domain in geo_domains %}
{% set hosts = geo_options[domain]['hosts'] | default(groups['geo_mirrors']) %}
- domain: {{ domain }}
ttl: 3600
records:
{{ domain }}:
- soa: {{ groups['geo_mirrors'] | first }}. root.archlinux.org. 2022042701 3600 1800 604800 3600
{% for host in groups['geo_mirrors'] %}
- ns:
ttl: {{ geo_options[domain]['ns_ttl'] | default(86400) }}
content: {{ host }}
{% endfor %}
- lua:
ttl: 300
content: >
A "ifurlup('https://{{ domain }}{{ geo_options[domain]['health_check_path'] | default('/') }}',
{'{{ hosts | map('extract', hostvars, ['ipv4_address']) | join("', '") }}'},
{selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})"
- lua:
ttl: 300
content: >
AAAA "ifurlup('https://{{ domain }}{{ geo_options[domain]['health_check_path'] | default('/') }}',
{'{{ hosts | map('extract', hostvars, ['ipv6_address']) | join("', '") }}'},
{selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})"
- lua:
ttl: 300
content: >
HTTPS "'1 . alpn=h2,h3 ipv4hint=' ..
ifurlup('https://{{ domain }}{{ geo_options[domain]['health_check_path'] | default('/') }}',
{'{{ hosts | map('extract', hostvars, ['ipv4_address']) | join("', '") }}'},
{selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})[1] ..
' ipv6hint=' ..
ifurlup('https://{{ domain }}{{ geo_options[domain]['health_check_path'] | default('/') }}',
{'{{ hosts | map('extract', hostvars, ['ipv6_address']) | join("', '") }}'},
{selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})[1]"
_acme-challenge.{{ domain }}:
- ns: {{ geo_acme_dns_challenge_ns }}
{% endfor %}