Permalink
Browse files

worked things around a bit. I would still like to see the dependancie…

…s handled more cleanly. All require are now in one file at least.
  • Loading branch information...
1 parent 5a1436b commit 056ef9c39c6b724a1ab438f6eb897b250824a55a root committed Dec 1, 2011
Showing with 52 additions and 77 deletions.
  1. +0 −2 tinydns/manifests/daemontools.pp
  2. +0 −8 tinydns/manifests/init.pp
  3. +34 −49 tinydns/manifests/setup.pp
  4. +18 −18 tinydns/manifests/utils.pp
@@ -1,7 +1,5 @@
# This class needs to have the daemontools package installed.
class tinydns::daemontools {
- Package['daemontools'] -> Class['tinydns::daemontools']
-
service { "dnscache":
provider => "daemontools",
path => "/etc/dnscache";
@@ -1,12 +1,4 @@
class tinydns {
# Do work.
-
- include tinydns::users
- include tinydns::daemontools
- include tinydns::utils # Contains all packages.
include tinydns::setup
- Class['tinydns::utils'] -> Class['tinydns::setup']
- Class['tinydns::users'] -> Class['tinydns::setup']
- Class['tinydns::daemontools'] -> Class['tinydns::setup']
-
}
@@ -2,74 +2,59 @@
include tinydns::users
include tinydns::daemontools
include tinydns::utils # Contains all packages.
+
exec { "rebuild-tinydns-data":
cwd => "/etc/tinydns/root",
command => "/usr/bin/make",
refreshonly => true,
- # require => [Package["djbdns"], Exec["tinydns-setup"], Exec["dnscache-setup"]],
+ require => [Package["djbdns"], Exec["tinydns-setup"], Exec["dnscache-setup"]],
notify => Service["dnscache"]
}
-
- exec {
- "tinydns-setup":
- command => "/usr/bin/tinydns-conf tinydns dnslog /etc/tinydns 127.0.0.1",
- creates => "/etc/tinydns",
- # require => [Class['tinydns::utils'],Class['tinydns::users']]
+ exec { "tinydns-setup":
+ command => "/usr/bin/tinydns-conf tinydns dnslog /etc/tinydns 127.0.0.1",
+ creates => "/etc/tinydns",
+ require => [Class['tinydns::utils'],Class['tinydns::users']]
}
-
- exec {
- "dnscache-setup":
- command => "/usr/bin/dnscache-conf dnscache dnslog /etc/dnscache $ipaddress",
- creates => "/etc/dnscache",
- # require => [Class['tinydns::utils'],Class['tinydns::users']]
+ exec { "dnscache-setup":
+ command => "/usr/bin/dnscache-conf dnscache dnslog /etc/dnscache $ipaddress",
+ creates => "/etc/dnscache",
+ require => [Class['tinydns::utils'],Class['tinydns::users']]
}
-
-
-
- file {
-
- "/etc/service":
- ensure => directory,
- mode => 0640,
- # require => [Exec["tinydns-setup"], Exec["dnscache-setup"]],
+ file { "/etc/service":
+ ensure => directory,
+ mode => 0640,
+ require => [Exec["tinydns-setup"], Exec["dnscache-setup"]],
}
- file {
- "/etc/service/tinydns":
- ensure => link,
- target => "/etc/tinydns",
- # require => [Exec["tinydns-setup"], Exec["dnscache-setup"]],
+ file { "/etc/service/tinydns":
+ ensure => link,
+ target => "/etc/tinydns",
+ require => Exec["tinydns-setup"],
}
- file {
- "/etc/service/dnscache":
- ensure => link,
- target => "/etc/dnscache",
- # require => [Exec["tinydns-setup"], Exec["dnscache-setup"]],
+ file { "/etc/service/dnscache":
+ ensure => link,
+ target => "/etc/dnscache",
+ require => Exec["dnscache-setup"],
}
-
-
file { "/etc/tinydns/log/run":
- # require => Exec["tinydns-setup"],
+ require => Exec["tinydns-setup"],
notify => Service["tinydns-log"],
ensure => present,
owner => "root",
group => "root",
mode => "0755",
source => "puppet:///modules/tinydns/tinydns-log",
}
-
- file {
- "/etc/dnscache/log/run":
- # require => Exec["dnscache-setup"],
- notify => Service["dnscache-log"],
- owner => "root",
- group => "root",
- mode => "0755",
- source => "puppet:///modules/tinydns/dnscache-log",
+ file { "/etc/dnscache/log/run":
+ require => Exec["dnscache-setup"],
+ notify => Service["dnscache-log"],
+ owner => "root",
+ group => "root",
+ mode => "0755",
+ source => "puppet:///modules/tinydns/dnscache-log",
}
- file {
- "/etc/dnscache/root/servers/internal":
- # require => Exec["dnscache-setup"],
- ensure => present,
- content => "127.0.0.1",
+ file { "/etc/dnscache/root/servers/internal":
+ require => Exec["dnscache-setup"],
+ ensure => present,
+ content => "127.0.0.1",
}
}
@@ -1,22 +1,22 @@
- class tinydns::utils {
- package { "djbdns":
- ensure => "present",
- source => "/etc/puppet/modules/tinydns/files/djbdns_1.05-4+lenny1_amd64.deb",
- provider => dpkg,
- }
+class tinydns::utils {
+ package { "djbdns":
+ ensure => "present",
+ source => "/etc/puppet/modules/tinydns/files/djbdns_1.05-4+lenny1_amd64.deb",
+ provider => dpkg,
+ }
- package { "make":
- ensure => "present"
- }
+ package { "make":
+ ensure => "present"
+ }
- package { "bsdutils":
- ensure => "present"
- }
+ package { "bsdutils":
+ ensure => "present"
+ }
- package { "daemontools":
- ensure => "present"
- }
- package { "daemontools-run":
- ensure => "present"
- }
+ package { "daemontools":
+ ensure => "present"
+ }
+ package { "daemontools-run":
+ ensure => "present"
}
+}

0 comments on commit 056ef9c

Please sign in to comment.