[bind] On génère named.conf.notify aussi pour tv.crans.org. On en profite pour le générer directement à partir de config.py

Ignore-this: 1e60e86462ba439552c78a76728f0ece

darcs-hash:20130128015929-3a55a-7589cdf931de406b49f27f75118a7aad449e833f.gz
This commit is contained in:
Valentin Samir 2013-01-28 02:59:29 +01:00
parent 9ac9a4749e
commit 7f8ff30c10
5 changed files with 31 additions and 20 deletions

View file

@ -0,0 +1,22 @@
# -*- mode: python; encoding: utf-8 -*-
info["owner"] = "root"
info["group"] = "bind"
info["perms"] = 0644
comment_start = "//"
header("Options de Bind9")
import config
def notify(ips):
print " also-notify { \n %s;\n };" % ';\n '.join(ips)
if has("dns-tv"):
notify(config.dns.slaves_tv)
if has("dns-primary"):
notify(config.dns.slaves + [config.dns.parent])

View file

@ -27,9 +27,6 @@ print 'acl "cransadm" { %s; };' % '; '.join(config.prefix['adm'] + config.NETs['
@ directory "/var/cache/bind";
@
if has("dns-primary"):
@ include "/etc/bind/named.conf.notify";
if has("dns-recursif") or has("dns-forward-only"):
zones=["127.0.0.1", "crans", "cransadm"]
@ -47,13 +44,16 @@ else:
@ allow-query-cache { 127.0.0.1; };
@ allow-recursion { 127.0.0.1; };
if has("dns-primary") or has("dns-tv"):
@ include "/etc/bind/named.conf.notify";
@ allow-transfer {
@ 127.0.0.1;
@ 138.231.136.0/21; // fixes
@ 138.231.148.0/22; // wifi
@ 10.231.136.0/24; // adm
print " %s;" % ';\n '.join(config.dns.slaves)
print " %s;" % config.dns.parent
if has("dns-primary"):
print " %s;" % ';\n '.join(config.dns.slaves + [config.dns.parent])
if has("dns-tv"):
print " %s;" % ';\n '.join(config.dns.slaves_tv)
@ };
@ allow-query { any; };
@ auth-nxdomain no; # conform to RFC1035