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/liwt.net.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/liwt.net.zone.j2')
-rw-r--r-- | roles/dns/templates/zones/liwt.net.zone.j2 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/roles/dns/templates/zones/liwt.net.zone.j2 b/roles/dns/templates/zones/liwt.net.zone.j2 new file mode 100644 index 0000000..fc44279 --- /dev/null +++ b/roles/dns/templates/zones/liwt.net.zone.j2 @@ -0,0 +1,46 @@ +{% set domain = "liwt.net" %} +{% set hostmaster = "hostmaster." + network.domain %} +; {{ ansible_managed }} +$ORIGIN {{ domain }}. +$TTL 1h + +; WARNING: +; +; The DNS CNAME ("canonical name") record exists to provide the canonical +; name associated with an alias name. There may be only one such canonical +; name for any one alias. That name should generally be a name that exists +; elsewhere in the DNS, though there are some rare applications for aliases +; with the accompanying canonical name undefined in the DNS. An alias name +; (label of a CNAME record) may, if DNSSEC is in use, have SIG, NXT, and +; KEY RRs, but may have no other data. +; +; Credit: https://serverfault.com/a/613830 + +@ IN SOA {{ nameservers[0].ns[0] }}. {{ hostmaster }}. ( + {{ domain | next_serial }} ; serial number + 1d ; refresh + 2h ; retry + 4w ; expire + 1h ; minimum + ) + +{% 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 @ +git IN CNAME @ +vultr IN CNAME @ +* IN CNAME @ + +@ IN MX 10 mail +@ IN TXT "v=spf1 mx -all" + +; vim: set ft=bindzone: |