Permalink
Browse files

added the subnet param to help with the creation of /ip/${network}.

  • Loading branch information...
1 parent 725dc68 commit a7833d98f2c7a82a64ce9caf934ad49481a7d0a9 root committed Dec 1, 2011
Showing with 16 additions and 6 deletions.
  1. +3 −1 tinydns/manifests/init.pp
  2. +13 −5 tinydns/manifests/setup.pp
@@ -1,4 +1,6 @@
class tinydns {
# Do work.
- include tinydns::setup
+ class { 'tinydns::setup':
+ subnet => "10.0.2",
+ }
}
@@ -1,6 +1,7 @@
-class tinydns::setup {
- include tinydns::users
- include tinydns::daemontools
+# subet: which network should dnscache resolve for.
+class tinydns::setup ( $subnet ){
+ include tinydns::users # Add users
+ include tinydns::daemontools #start the servies dnscache, and tinydns
include tinydns::utils # Contains all packages.
exec { "rebuild-tinydns-data":
@@ -18,7 +19,7 @@
exec { "dnscache-setup":
command => "/usr/bin/dnscache-conf dnscache dnslog /etc/dnscache $ipaddress",
creates => "/etc/dnscache",
- require => [Class['tinydns::utils'],Class['tinydns::users']]
+ require => [Class['tinydns::utils'],Class['tinydns::users']]
}
file { "/etc/service":
ensure => directory,
@@ -35,13 +36,20 @@
target => "/etc/dnscache",
require => Exec["dnscache-setup"],
}
+ file { "/etc/dnscache/root/ip/${subnet}":
+ ensure => present,
+ mode => 644,
+ owner => "root",
+ group => "root",
+ require => Exec["dnscache-setup"],
+ }
file { "/etc/tinydns/log/run":
require => Exec["tinydns-setup"],
notify => Service["tinydns-log"],
ensure => present,
owner => "root",
group => "root",
- mode => "0755",
+ mode => "0755",
source => "puppet:///modules/tinydns/tinydns-log",
}
file { "/etc/dnscache/log/run":

0 comments on commit a7833d9

Please sign in to comment.