diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2019-04-02 17:53:01 +0200 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2019-04-02 18:07:25 +0200 |
commit | 14d5cbd332a15a8438a458e8c4817d4458c2145b (patch) | |
tree | c91b2692120bebd88273302ecb150284cde22874 /roles/space_server/templates | |
parent | 0c19892158609d1eb64015f84e53eb5685c97441 (diff) | |
download | labitat-ansible-14d5cbd332a15a8438a458e8c4817d4458c2145b.tar.gz labitat-ansible-14d5cbd332a15a8438a458e8c4817d4458c2145b.tar.xz labitat-ansible-14d5cbd332a15a8438a458e8c4817d4458c2145b.zip |
space_server: named: create reverse ipv4 zone
Diffstat (limited to 'roles/space_server/templates')
-rw-r--r-- | roles/space_server/templates/ipv4.rev.zone.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/space_server/templates/ipv4.rev.zone.j2 b/roles/space_server/templates/ipv4.rev.zone.j2 new file mode 100644 index 0000000..1736333 --- /dev/null +++ b/roles/space_server/templates/ipv4.rev.zone.j2 @@ -0,0 +1,12 @@ +42.10.in-addr.arpa. 600 IN SOA space.labitat.dk. esmil.labitat.dk. 2019040101 7200 3600 604800 86400 +42.10.in-addr.arpa. 600 IN NS space.labitat.dk. + +{% for host in local_hosts %} +{% if 'ipv4' in host %} +{% for ip in host.ipv4 %} +{% if ip.startswith('10.42.') %} +{{ ip.split('.')[3] }}.{{ ip.split('.')[2] }}.42.10.in-addr.arpa. 600 IN PTR {{ host.name }}.s. +{% endif %} +{% endfor %} +{% endif %} +{% endfor %} |