add some more IPs for zobel
[mirror/dsa-puppet.git] / manifests / site.pp
index f287164..d7a965d 100644 (file)
@@ -15,97 +15,143 @@ 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")
-    notice("hoster for ${fqdn} is ${hoster}")
-
-    $mxinfo   = allnodeinfo("mXRecord")
+    $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
     }
-    case $kvmdomain {
-        "true":    { package { acpid: ensure => installed } }
+
+    if $::productname == 'PowerEdge 2850' {
+        include megactl
     }
-    case $mptraid {
-        "true":    { include "raidmpt" }
+
+    if $::mptraid {
+        include raidmpt
     }
 
-    case $mta {
-        "exim4":   {
-             case extractnodeinfo($nodeinfo, 'heavy_exim') {
-                  'true':  { include exim::mx }
-                  default: { include exim }
-             }
+    if $::kvmdomain {
+        include acpi
+    }
+
+    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
     }
 
-    case $hostname {
-        klecker,ravel,senfl,orff: { include named::secondary }
-        geo1,geo2,geo3:           { include named::geodns }
-        bartok,franck,liszt,master,ries,samosa,schein,spohr,steffani:   { include named::recursor }
+
+    if getfromhash($nodeinfo, 'buildd') {
+        include buildd
     }
 
-    case $hostname {
-        cilea,luchesi,merikanto,paganini,rautavaara,sibelius: {}
-        default: {
-             case $kernel {
-                 Linux: {
-                     include ferm
-                 }
-             }
-         }
+    case $::hostname {
+        ravel,senfl,orff,draghi,diamond: { include named::authoritative }
+        geo1,geo2,geo3:                  { include named::geodns }
+        liszt:                           { include named::recursor }
     }
-    include ferm::per-host
 
-    case $brokenhosts {
-        "true":    { include hosts }
+    case $::hostname {
+        franck,master,lobos,samosa,spohr,widor:   { include unbound }
     }
-    case $hoster {
-        "ubcece", "darmstadt", "ftcollins", "grnet":  { include resolv }
+
+    if $::lsbdistcodename != 'lenny' {
+        include unbound
     }
-    case $portforwarder_user_exists {
-        "true":    { include portforwarder }
+
+    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
+        }
+    }
+
+    if $::brokenhosts {
+        include hosts
+    }
+
+    if $::portforwarder_user_exists {
+        include portforwarder
+    }
+
     include samhain
+
+    case $::hostname {
+        chopin,geo3,soler,wieck: {
+            include debian-radvd
+        }
+    }
+
+    if $::kernel == 'Linux' {
+        include entropykey
+    }
+
+    if ($::postgres84 or $::postgres90) {
+        include postgres
+    }
 }
+
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4: