geo.yml.j2 1.17 KB
Newer Older
1
2
3
#jinja2:lstrip_blocks: True
---
domains:
4
5
  {% for domain in geo_domains %}
  - domain: {{ domain }}
6
7
    ttl: 3600
    records:
8
9
10
      {{ domain }}:
        - soa: {{ groups['geo_mirrors'] | first }}. root.archlinux.org. 2022042701 3600 1800 604800 3600
        {% for host in groups['geo_mirrors'] %}
11
12
13
14
        - ns:
            ttl: 86400
            content: {{ host }}
        {% endfor %}
15
16
17
        - lua:
            ttl: 300
            content: >
18
              A "ifurlup('https://{{ domain }}{{ geo_health_check_paths[domain] | default('/') }}',
19
20
21
22
23
              {'{{ groups['geo_mirrors'] | map('extract', hostvars, ['ipv4_address']) | join("', '") }}'},
              {selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})"
        - lua:
            ttl: 300
            content: >
24
              AAAA "ifurlup('https://{{ domain }}{{ geo_health_check_paths[domain] | default('/') }}',
25
26
              {'{{ groups['geo_mirrors'] | map('extract', hostvars, ['ipv6_address']) | join("', '") }}'},
              {selector='pickclosest', useragent='pdns on {{ inventory_hostname }}'})"
27
28
29
      _acme-challenge.{{ domain }}:
        - ns: {{ geo_acme_dns_challenge_ns }}
  {% endfor %}