Version information
released Dec 18th 2012
Start using this module
Add this module to your Puppetfile:
mod 'thias-bind', '0.2.5'Learn more about managing modules with a PuppetfileDocumentation
thias/bind — version 0.2.5 Dec 18th 2012
bind
Install and enable a BIND DNS server, create and manage DNS zone files.
bind::server: Main class to install and enable the server.bind::server::conf: Main definition to configure the server.bind::server::file: Definition to manage zone files.
Here is a typical LAN recursive caching DNS server configuration :
include bind::server
bind::server::conf { '/etc/named.conf':
listen_on_addr => [ 'any' ],
listen_on_v6_addr => [ 'any' ],
forwarders => [ '8.8.8.8', '8.8.4.4' ],
allow_query => [ 'localnets' ],
zones => {
'myzone.lan' => [
'type master',
'file "myzone.lan"',
],
'1.168.192.in-addr.arpa' => [
'type master',
'file "1.168.192.in-addr.arpa"',
],
},
}
The zone files for the above could then be managed like this :
bind::server::file { 'myzone.lan':
zonedir => '/var/named/chroot/var/named',
source => 'puppet:///files/dns/myzone.lan',
}
bind::server::file { '1.168.192.in-addr.arpa':
zonedir => '/var/named/chroot/var/named',
source => 'puppet:///files/dns/1.168.192.in-addr.arpa',
}
To avoid repeating the 'zonedir' parameter each time, you can also use :
Bind::Server::File { zonedir => '/var/named/chroot/var/named' }
Then if all source files are in the same location and named after the zone :
bind::server::file { [ 'myzone.lan', '1.168.192.in-addr.arpa' ]:
source_base => 'puppet:///files/dns/',
}
Since SELinux offers a very high level of protection, chrooting is quite redundant, so here is how to configure bind without chroot :
class { 'bind::server': chroot => false }
bind::server::conf { '/etc/named.conf':
# [... same as before ...]
},
bind::server::file { 'myzone.lan':
source => 'puppet:///files/dns/myzone.lan',
}
2012-12-18 - 0.2.5
- Change the SELinux type of the log directory back to the original.
2012-09-19 - 0.2.4
- Update README to make the main example more useful.
- Support $source_base for easy inclusion of multiple zone files as-is.
2012-07-17 - 0.2.3
- Add support for "include" lines in named.conf.
2012-06-22 - 0.2.2
- Add support for a few new configuration values in the main template.
- Require package for files, for the usual parent directory to exist.
- Minot updates to the README.
2012-04-23 - 0.2.1
- Clean up the module to match current puppetlabs guidelines.
- Force hash sorting in the template for puppet 2.7+ compatibility.
Copyright (C) 2011 Matthias Saou
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.