diff options
author | Aaron LI <aly@aaronly.me> | 2018-03-02 09:07:58 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-03-14 11:35:07 +0800 |
commit | e9aa03b6dc0f32c98d3088e4bcac5e847de4b08d (patch) | |
tree | 2bb977f3c5e137ccd20a92698f8a447a06dad054 /roles/dns/templates/zones/233233.xyz.zone.j2 | |
parent | 562731165ec849bf9644b9bff0f2d198ecc7f37c (diff) | |
download | ansible-dfly-vps-e9aa03b6dc0f32c98d3088e4bcac5e847de4b08d.tar.bz2 |
dns: update zones templates and add liwt.net zone
Diffstat (limited to 'roles/dns/templates/zones/233233.xyz.zone.j2')
-rw-r--r-- | roles/dns/templates/zones/233233.xyz.zone.j2 | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/roles/dns/templates/zones/233233.xyz.zone.j2 b/roles/dns/templates/zones/233233.xyz.zone.j2 index 9a71750..4067cea 100644 --- a/roles/dns/templates/zones/233233.xyz.zone.j2 +++ b/roles/dns/templates/zones/233233.xyz.zone.j2 @@ -1,38 +1,29 @@ -$ORIGIN 233233.xyz. -$TTL 1h - -; WARNING: -; A CNAME record is NOT allowed to coexist with *any other* data! -; Therefore one can't have a CNAME Record at the zone root, because -; the zone root must have two mandatory records: SOA and NS. -; -; According to the specification: if a CNAME RR is present at a node, -; no other data should be present; this ensures that the data for a -; canonical name and its aliases cannot be different. This rule also -; insures that a cached CNAME can be used without checking with an -; authoritative server for other RR types. - -@ IN SOA ns.233233.xyz. admin.233233.xyz. ( - 2018022123 ; serial number +{% set domain = "233233.xyz" %} +{% set hostmaster = "hostmaster." + network.domain %} +; {{ ansible_managed }} +$ORIGIN {{ domain }}. +$TTL 1h + +@ IN SOA {{ nameservers[0].ns[0] }}. {{ hostmaster }}. ( + {{ domain | next_serial }} ; serial number 1d ; refresh 2h ; retry 4w ; expire 1h ; minimum TTL ) -@ IN NS ns2.afraid.org. - -;@ IN MX 10 mail.233233.xyz. +{% for server in nameservers %} +{% for ns in server.ns %} +@ IN NS {{ ns }}. ; {{ server.name }} +{% endfor %} +{% endfor %} @ IN A {{ network.ipv4.address }} @ IN AAAA {{ network.ipv6.address }} -;mail IN A {{ network.ipv4.address }} -;mail IN AAAA {{ network.ipv6.address }} www IN CNAME @ g IN CNAME @ zw IN CNAME @ +* IN CNAME @ -;@ IN TXT "v=spf1 mx -all" - -; vim: set ft=bindzone : +; vim: set ft=bindzone: |