fixes logrotate
diff --git a/README.md b/README.md
index 83a95d7..9debc9f 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,17 @@
zone:
sub.domain.com:
type: master
- notify: False
+ notify: false
+ records:
+ - name: @
+ type: A
+ ttl: 7200
+ value: 192.168.0.5
1.168.192.in-addr.arpa:
type: master
- notify: False
+ notify: false
## Read more
+* https://github.com/theforeman/puppet-dns
* https://help.ubuntu.com/community/BIND9ServerHowto
\ No newline at end of file
diff --git a/files/logrotate b/files/logrotate
index 174b74b..410bde4 100644
--- a/files/logrotate
+++ b/files/logrotate
@@ -1,4 +1,4 @@
-/var/log/bind9/query.log {
+/var/log/named/query.log {
rotate 7
daily
missingok
diff --git a/files/named.ca b/files/named.ca
new file mode 100644
index 0000000..902a704
--- /dev/null
+++ b/files/named.ca
@@ -0,0 +1,85 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.root
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: Feb 04, 2008
+; related version of root zone: 2008020400
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 IN NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30
+;
+; formerly NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+;
+; formerly C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+;
+; formerly TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
+;
+; formerly NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; formerly NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; formerly NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; formerly AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
+;
+; formerly NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+;
+; operated by VeriSign, Inc.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30
+;
+; operated by RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; operated by ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+;
+; operated by WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of File
diff --git a/files/named.conf.options b/files/named.conf.options
index 8cabfa1..24012ca 100644
--- a/files/named.conf.options
+++ b/files/named.conf.options
@@ -26,14 +26,14 @@
category queries { query.log; };
channel query.log {
- file "/var/named/query.log";
+ file "/var/log/named/query.log";
print-time yes;
severity debug 3;
};
category update { update_log; };
channel update_log {
- file "/var/named/update.log" versions 2 size 20m;
+ file "/var/log/named/update.log" versions 2 size 20m;
print-time yes;
print-category yes;
print-severity yes;
diff --git a/files/named.local b/files/named.local
new file mode 100644
index 0000000..8bfc435
--- /dev/null
+++ b/files/named.local
@@ -0,0 +1,10 @@
+$TTL 86400
+@ IN SOA localhost. root.localhost. (
+ 1997022700 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 3600000 ; Expire
+ 86400 ) ; Minimum
+ IN NS localhost.
+
+1 IN PTR localhost.
diff --git a/server/service.sls b/server/service.sls
index b7eb88f..eebe4fa 100644
--- a/server/service.sls
+++ b/server/service.sls
@@ -99,14 +99,14 @@
- watch_in:
- service: bind_service
-/var/log/bind9:
+/var/log/named:
file.directory:
- user: {{ server.user }}
- group: {{ server.group }}
- mode: 775
- template: jinja
-/var/log/bind9/query.log:
+/var/log/named/query.log:
file.managed:
- user: {{ server.user }}
- group: {{ server.group }}