# The file is WirelessLeiden specific. Please make all changes in exodus
#
# Generated on {% now "G:i j-n-Y" %} 
# by {{ node.host }}
#
# Node: {{ node.name }}
# File: named.conf 

options {
	directory "/etc/namedb";
	pid-file "/var/run/named.pid";
	forwarders {
	{% for server in node.network.dnsserver_set.all %}
	{{server.ipaddress }}; {% endfor %}
	};
};


zone "." {
	type hint;
	file "/etc/namedb/named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
	type master;
	file "/etc/namedb/localhost.rev";
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" {
	type master;
	file "/etc/namedb/localhost-v6.rev";
};

{#XXX: Needs some rethinking on how to allow this to be called again #}
{% for domain in node.domains %}

zone "{{domain.domainname}}" {
	type slave;
	file "slave.{{domain.domainname}}";
	masters {
		{% for server in domain.dnsserver_set.all %}
		{{ server.ipaddress }}; {% endfor %}
	};
};

{% endfor %}


