]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - manifests/site.pp
some readability cleanup
[dsa-puppet.git] / manifests / site.pp
index 4504a595556da11fefa207e286fac5680da57786..b4f44c26e379cf9e90a692a4e77820b9f0c82578 100644 (file)
@@ -15,106 +15,148 @@ Exec {
 
 node default {
     $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml")
-    $nodeinfo  = nodeinfo($fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml")
-    $hoster    = whohosts($nodeinfo, "/etc/puppet/modules/debian-org/misc/hoster.yaml")
-    $keyinfo   = allnodeinfo("sshRSAHostKey", "ipHostNumber")
-    $mxinfo    = allnodeinfo("mXRecord")
-    notice("hoster for ${fqdn} is ${hoster}")
+    $nodeinfo  = nodeinfo($::fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml")
+    $allnodeinfo = allnodeinfo("sshRSAHostKey ipHostNumber", "purpose mXRecord physicalHost purpose")
+    notice( sprintf("hoster for %s is %s", $::fqdn, getfromhash($nodeinfo, 'hoster', 'name') ) )
 
     include munin-node
+    include syslog-ng
     include sudo
     include ssh
     include debian-org
     include monit
     include apt-keys
     include ntp
+    include ntpdate
     include ssl
-
     include motd
 
-    case $hostname {
+    case $::hostname {
         finzi,fano,fasch,field:    { include kfreebsd }
     }
 
-    case $smartarraycontroller {
-        "true":    { include debian-proliant }
+    if $::smartarraycontroller {
+        include debian-proliant
+    }
+
+    if $::productname == 'PowerEdge 2850' {
+        include megactl
     }
-    case $kvmdomain {
-        "true":    { package { acpid: ensure => installed } }
+
+    if $::mptraid {
+        include raidmpt
     }
-    case $mptraid {
-        "true":    { include "raidmpt" }
+
+    if $::kvmdomain {
+        include acpi
     }
 
-    case $mta {
-        "exim4":   {
-             case extractnodeinfo($nodeinfo, 'heavy_exim') {
-                  'true':  { include exim::mx }
-                  default: { include exim }
-             }
+    if $::mta == 'exim4' {
+        case getfromhash($nodeinfo, 'heavy_exim') {
+             true:  { include exim::mx }
+             default: { include exim }
         }
     }
 
-    case extractnodeinfo($nodeinfo, 'muninmaster') {
-        true: { include munin-node::master }
+    if getfromhash($nodeinfo, 'puppetmaster') {
+        include puppetmaster
+    }
+
+    if getfromhash($nodeinfo, 'muninmaster') {
+        include munin-node::master
     }
 
-    case extractnodeinfo($nodeinfo, 'nagiosmaster') {
+    case getfromhash($nodeinfo, 'nagiosmaster') {
         true:    { include nagios::server }
         default: { include nagios::client }
     }
 
-    case $apache2 {
-         "true":  {
-              case extractnodeinfo($nodeinfo, 'apache2_security_mirror') {
-                     true:    { include apache2::security_mirror }
-                     default: { include apache2 }
-              }
+    if $::apache2 {
+         if getfromhash($nodeinfo, 'apache2_security_mirror') {
+                include apache2::security_mirror
+         }
+         if getfromhash($nodeinfo, 'apache2_www_mirror') {
+                include apache2::www_mirror
          }
+         if getfromhash($nodeinfo, 'apache2_backports_mirror') {
+                include apache2::backports_mirror
+         }
+         if getfromhash($nodeinfo, 'apache2_ftp-upcoming_mirror') {
+                include apache2::ftp-upcoming_mirror
+         }
+         include apache2
     }
 
-    case extractnodeinfo($nodeinfo, 'buildd') {
-         'true':  {
-             include buildd
-         }
+    if $::rsyncd {
+        include rsyncd-log
+    }
+
+
+    if getfromhash($nodeinfo, 'buildd') {
+        include buildd
     }
 
-    case $hostname {
-        klecker,ravel,senfl,orff,draghi: { include named::authoritative }
+    case $::hostname {
+        ravel,senfl,orff,draghi,diamond: { include named::authoritative }
         geo1,geo2,geo3:                  { include named::geodns }
-        bartok,franck,liszt,master,samosa,schein,spohr,steffani:   { include named::recursor }
+        liszt:                           { include named::recursor }
     }
 
-    case $kernel {
-        Linux: {
-            include ferm
-            include ferm::per-host
-        }
+    case $::hostname {
+        franck,master,lobos,samosa,spohr,widor:   { include unbound }
     }
 
-    case $hostname {
-        beethoven,ravel,spohr: {
+    if $::lsbdistcodename != 'lenny' {
+        include unbound
+    }
+
+    include resolv
+
+    if $::kernel == 'Linux' {
+        include ferm
+        include ferm::per-host
+    }
+
+    case $::hostname {
+        diabelli,nono,spohr: { include dacs }
+    }
+
+    case $::hostname {
+        beethoven,duarte,spohr,stabile: {
             include nfs-server
         }
     }
 
-    case $brokenhosts {
-        "true":    { include hosts }
+    if $::brokenhosts {
+        include hosts
     }
-    case $hoster {
-        "ubcece", "darmstadt", "ftcollins", "grnet":  { include resolv }
-    }
-    case $portforwarder_user_exists {
-        "true":    { include portforwarder }
+
+    if $::portforwarder_user_exists {
+        include portforwarder
     }
 
     include samhain
 
-    case $hostname {
-        byrd,schuetz,draghi,lamb:    { include krb }
+    case $::hostname {
+        byrd,schuetz,tchaikovsky,draghi,quantz,lamb,locke,rautavaara,rietz: {
+            include krb
+        }
+    }
+
+    case $::hostname {
+        chopin,geo3,soler,wieck: {
+            include debian-radvd
+        }
     }
-    case $hostname {
-        lamb:    { include afs::server }
+
+    if $::kernel == 'Linux' {
+        include entropykey
+    }
+
+    if $::postgres84 == "true" {
+        include postgres
+    } elsif $::postgres90 == "true" {
+        include postgres
     }
 }