On stabilise le plugin Python en virant toute occurrence de print.
* Désolé. \o/
This commit is contained in:
parent
2c27a030ee
commit
4b36a51d99
102 changed files with 513 additions and 703 deletions
|
@ -29,4 +29,4 @@ header("Zone du dns menteur pour accueil")
|
|||
for ip in config.accueil_route.keys():
|
||||
if 'hosts' in config.accueil_route[ip].keys():
|
||||
for host in config.accueil_route[ip]['hosts']:
|
||||
print "%s IN A %s" % (host,ip)
|
||||
out("%s IN A %s" % (host, ip))
|
||||
|
|
|
@ -12,16 +12,16 @@ header("Zone du dns menteur")
|
|||
|
||||
@$TTL 3600 ; 1 hour
|
||||
@@ IN SOA sable.crans.org. root.crans.org. (
|
||||
print """ 2386410401 ; serial
|
||||
21600 ; refresh (6 hours)
|
||||
3600 ; retry (1 hour)
|
||||
1209600 ; expire (2 weeks)
|
||||
3600 ; minimum (1 hour)
|
||||
)
|
||||
NS sable.crans.org.
|
||||
"""
|
||||
@ 2386410401 ; serial
|
||||
@ 21600 ; refresh (6 hours)
|
||||
@ 3600 ; retry (1 hour)
|
||||
@ 1209600 ; expire (2 weeks)
|
||||
@ 3600 ; minimum (1 hour)
|
||||
@ )
|
||||
@ NS sable.crans.org.
|
||||
@
|
||||
|
||||
print "archive.ubuntu.com CNAME charybde.crans.org."
|
||||
print "*.archive.ubuntu.com CNAME charybde.crans.org."
|
||||
@archive.ubuntu.com CNAME charybde.crans.org.
|
||||
@*.archive.ubuntu.com CNAME charybde.crans.org.
|
||||
|
||||
print "teredo.ipv6.microsoft.com CNAME ."
|
||||
@teredo.ipv6.microsoft.com CNAME .
|
||||
|
|
|
@ -12,13 +12,13 @@ header("Zone pour la response policy pour les utilisateur courant")
|
|||
|
||||
@$TTL 3600 ; 1 hour
|
||||
@@ IN SOA sable.crans.org. root.crans.org. (
|
||||
print """ 2386410401 ; serial
|
||||
21600 ; refresh (6 hours)
|
||||
3600 ; retry (1 hour)
|
||||
1209600 ; expire (2 weeks)
|
||||
3600 ; minimum (1 hour)
|
||||
)
|
||||
NS sable.crans.org.
|
||||
"""
|
||||
@ 2386410401 ; serial
|
||||
@ 21600 ; refresh (6 hours)
|
||||
@ 3600 ; retry (1 hour)
|
||||
@ 1209600 ; expire (2 weeks)
|
||||
@ 3600 ; minimum (1 hour)
|
||||
@ )
|
||||
@ NS sable.crans.org.
|
||||
@
|
||||
|
||||
print "teredo.ipv6.microsoft.com CNAME ."
|
||||
@teredo.ipv6.microsoft.com CNAME .
|
||||
|
|
|
@ -17,7 +17,7 @@ class print_idented(object):
|
|||
def __init(self):
|
||||
pass
|
||||
def p(self, str):
|
||||
print '%s%s' % (' '*ident, str)
|
||||
out('%s%s' % (' '*ident, str))
|
||||
|
||||
class view(print_idented):
|
||||
def __init__(self, name, match_client=None):
|
||||
|
@ -121,11 +121,11 @@ with view("default-view", "any") as v:
|
|||
z.p(' %s;' % f)
|
||||
z.p('};')
|
||||
|
||||
print """
|
||||
out("""
|
||||
// bricoles de config en plus
|
||||
include "/etc/bind/rndc.key";
|
||||
|
||||
controls {
|
||||
inet 127.0.0.1 allow { 127.0.0.1; } keys { "key"; };
|
||||
};
|
||||
"""
|
||||
""")
|
||||
|
|
|
@ -11,7 +11,7 @@ header("Options de Bind9")
|
|||
import config.dns
|
||||
|
||||
def notify(ips):
|
||||
print " also-notify { \n %s;\n };" % ';\n '.join(ips)
|
||||
out(" also-notify { \n %s;\n };" % (';\n '.join(ips),))
|
||||
|
||||
|
||||
allowed = set()
|
||||
|
|
|
@ -13,16 +13,16 @@ import config.dns
|
|||
|
||||
comment("Listes d'acces")
|
||||
if has("vlan-isolement"):
|
||||
print 'acl "isolement" { %s; };' % '; '.join(config.NETs['isolement'])
|
||||
out('acl "isolement" { %s; };' % ('; '.join(config.NETs['isolement']),))
|
||||
if has("vlan-radin"):
|
||||
print 'acl "radins" { %s; };' % '; '.join(config.NETs['gratuit'])
|
||||
out('acl "radins" { %s; };' % ('; '.join(config.NETs['gratuit']),))
|
||||
if has("vlan-accueil"):
|
||||
print 'acl "accueil" { %s; };' % '; '.join(config.NETs['accueil'])
|
||||
out('acl "accueil" { %s; };' % ('; '.join(config.NETs['accueil']),))
|
||||
if has("vlan-ens"):
|
||||
print 'acl "appartement" { %s; };' % '; '.join(config.NETs['personnel-ens'] + config.prefix['personnel-ens'])
|
||||
print 'acl "crans" { %s; };' % '; '.join(config.prefix['fil'] + config.prefix['wifi'] + config.NETs['all'])
|
||||
print 'acl "cransadm" { %s; };' % '; '.join(config.prefix['adm'] + config.NETs['adm'])
|
||||
print 'acl "menteur" { %s; };' % '; '.join(config.dns.menteur_clients)
|
||||
out('acl "appartement" { %s; };' % ('; '.join(config.NETs['personnel-ens'] + config.prefix['personnel-ens']),))
|
||||
out('acl "crans" { %s; };' % ('; '.join(config.prefix['fil'] + config.prefix['wifi'] + config.NETs['all']),))
|
||||
out('acl "cransadm" { %s; };' % ('; '.join(config.prefix['adm'] + config.NETs['adm']),))
|
||||
out('acl "menteur" { %s; };' % ('; '.join(config.dns.menteur_clients),))
|
||||
|
||||
|
||||
@options {
|
||||
|
@ -40,8 +40,8 @@ if has("dns-recursif") or has("dns-forward-only"):
|
|||
zones.append("accueil")
|
||||
if has("vlan-isolement"):
|
||||
zones.append("isolement")
|
||||
print " allow-query-cache { %s; };" % '; '.join(zones)
|
||||
print " allow-recursion { %s; };" % '; '.join(zones)
|
||||
out(" allow-query-cache { %s; };" % ('; '.join(zones),))
|
||||
out(" allow-recursion { %s; };" % ('; '.join(zones),))
|
||||
@ recursive-clients 5000;
|
||||
|
||||
else:
|
||||
|
@ -62,7 +62,7 @@ if has("dns-primary") or has("dns-tv"):
|
|||
if allowed:
|
||||
allowed = list(allowed)
|
||||
allowed.sort()
|
||||
print " %s;" % ';\n '.join(allowed)
|
||||
out(" %s;" % (';\n '.join(allowed),))
|
||||
@ };
|
||||
@ allow-query { any; };
|
||||
@ auth-nxdomain no; # conform to RFC1035
|
||||
|
@ -75,7 +75,7 @@ if not has("dns-secondary-no-forward") and not has("dns-forward-only"):
|
|||
@ // Ne pas modifier le commentaire de fin de ligne suivant,
|
||||
@ // traitement automatique pour la connexion de secours
|
||||
@ // (ligne decommentee automatiquement en mode secours)
|
||||
print"// forwarders { %s; } ; #POUR SECOURS" % config.dns.secours_relay
|
||||
out("// forwarders { %s; } ; #POUR SECOURS" % (config.dns.secours_relay,))
|
||||
|
||||
if has("dnssec-validation"):
|
||||
@ dnssec-enable yes;
|
||||
|
|
|
@ -11,6 +11,6 @@ info["mode"] = 0640
|
|||
@
|
||||
@key "key" {
|
||||
@ algorithm hmac-md5;
|
||||
print ' secret "%s";' % secrets.rndc_key
|
||||
out(' secret "%s";' % (secrets.rndc_key,))
|
||||
@};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue