¶ ↑
Puppet-tinydnsThis module can be used to manage tinydns data files
¶ ↑
InstallationFirst get a copy of the module
cd /etc/puppet/modules git clone git://github.com/yendor/puppet-tinydns.git tinydns
Also make sure you have your module path setup and plugin sync enabled
¶ ↑
UsageInclude the setup class to get the command to rebuild the data.cdb file
include tinydns::setup
Add dns records based on the cr.yp.to/djbdns/tinydns-data.html format. The types are the types specified in that format
dnsrecord { "nameserver for thdojo": ensure => present, type => ".", fqdn => "thedojo", ipaddr => "192.168.1.1", notify => Exec["rebuild-tinydns-data"] } dnsrecord { "puppet server for thdojo": ensure => present, type => ".", fqdn => "puppet.thedojo", ipaddr => "192.168.1.1", notify => Exec["rebuild-tinydns-data"] }
This assumes that you have a domain called thedojo and want to add an NS record for it at 192.168.1.1 and setup puppet.thedojo as an A record.
If you want to setup reverse dns for the 192.168.1.0/24 subnet you could add
dnsrecord { "reverse dns for 192.168.1.0/24 subnet": ensure => present, type => ".", fqdn => "1.168.192.in-addr.arpa", ipaddr => "192.168.1.1", notify => Exec["rebuild-tinydns-data"] }
Once this is in, you can use the = dns record type to add forward and reverse dns records with one dnsrecord definition.
If you use exported resources then you can add a dns entry for all your servers using this class automatically by including this on all the servers
@@dnsrecord { "forward and reverse dns for $fqdn": ensure => "present", type => "=", fqdn => "$fqdn", ipaddr => "$ipaddress", ttl => 300, notify => Exec["rebuild-tinydns-data"] }
Which will add forward and reverse dns entries for each machine with a TTL of 300 seconds.
Then on the actual dns server add
Dnsrecord <<| |>>
to collect all the dns records on the server
¶ ↑
NotesAll the types of records specified in the tinydns-data format have been implemented aside from the Z record type.