initial commit
diff --git a/files/logrotate b/files/logrotate
new file mode 100644
index 0000000..174b74b
--- /dev/null
+++ b/files/logrotate
@@ -0,0 +1,11 @@
+/var/log/bind9/query.log {
+    rotate 7
+    daily
+    missingok
+    notifempty
+    sharedscripts
+    copytruncate
+    compress
+    create 0664 bind root
+    su
+}
\ No newline at end of file
diff --git a/files/named.conf b/files/named.conf
new file mode 100644
index 0000000..5134e55
--- /dev/null
+++ b/files/named.conf
@@ -0,0 +1,11 @@
+// This is the primary configuration file for the BIND DNS server named.
+//
+// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
+// structure of BIND configuration files in Debian, *BEFORE* you customize
+// this configuration file.
+//
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
+
+include "/etc/bind/named.conf.options";
+include "/etc/bind/named.conf.local";
+include "/etc/bind/named.conf.default-zones";
\ No newline at end of file
diff --git a/files/named.conf.default-zones b/files/named.conf.default-zones
new file mode 100644
index 0000000..6b13d53
--- /dev/null
+++ b/files/named.conf.default-zones
@@ -0,0 +1,28 @@
+// prime the server with knowledge of the root servers
+zone "." {
+      type hint;
+      file "/etc/bind/db.root";
+};
+
+// be authoritative for the localhost forward and reverse zones, and for
+// broadcast zones as per RFC 1912
+
+zone "localhost" {
+      type master;
+      file "/etc/bind/db.local";
+};
+
+zone "127.in-addr.arpa" {
+      type master;
+      file "/etc/bind/db.127";
+};
+
+zone "0.in-addr.arpa" {
+      type master;
+      file "/etc/bind/db.0";
+};
+
+zone "255.in-addr.arpa" {
+      type master;
+      file "/etc/bind/db.255";
+};
\ No newline at end of file
diff --git a/files/named.conf.local b/files/named.conf.local
new file mode 100644
index 0000000..d7f9b6b
--- /dev/null
+++ b/files/named.conf.local
@@ -0,0 +1,31 @@
+//
+// Do any local configuration here
+//
+
+// Consider adding the 1918 zones here, if they are not used in your
+// organization
+//include "/etc/bind/zones.rfc1918";
+
+{% for key,args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%}
+{%- set file = salt['pillar.get']("available_zones:" + key + ":file") %}
+{%- set masters = salt['pillar.get']("available_zones:" + key + ":masters") %}
+zone "{{ key }}" {
+  type {{ args['type'] }};
+  file "zones/{{ file }}";
+  {% if args['type'] == "master" -%}
+    {% if args['notify'] -%}
+  notify yes;
+    {% else -%}
+  notify no;
+    {%- endif -%}
+  {% else -%}
+  notify no;
+  masters { {{ masters }} };
+  {%- endif %}
+};
+{% endfor %}
+
+logging {
+  channel "querylog" { file "/var/log/bind9/query.log"; print-time yes; };
+  category queries { querylog; };
+};
\ No newline at end of file
diff --git a/files/named.conf.options b/files/named.conf.options
new file mode 100644
index 0000000..80ee0a3
--- /dev/null
+++ b/files/named.conf.options
@@ -0,0 +1,21 @@
+options {
+        directory "/var/cache/bind";
+
+        // If there is a firewall between you and nameservers you want
+        // to talk to, you may need to fix the firewall to allow multiple
+        // ports to talk. See http://www.kb.cert.org/vuls/id/800113
+
+        // If your ISP provided one or more IP addresses for stable
+        // nameservers, you probably want to use them as forwarders.
+        // Uncomment the following block, and insert the addresses replacing
+        // the all-0's placeholder.
+
+        // forwarders {
+        // 0.0.0.0;
+        // };
+
+        auth-nxdomain no; # conform to RFC1035
+        {% if salt['pillar.get']('bind:config:ipv6', 'False') %}
+        listen-on-v6 { {{ salt['pillar.get']('bind:config:ipv6_listen', 'any') }}; };
+        {% endif %}
+};
\ No newline at end of file