merged immerda
authorMarcel Haerry <haerry@puzzle.ch>
Tue, 22 Apr 2008 09:43:26 +0000 (11:43 +0200)
committerMarcel Haerry <haerry@puzzle.ch>
Tue, 22 Apr 2008 09:43:26 +0000 (11:43 +0200)
1  2 
manifests/client.pp
manifests/host.pp
manifests/init.pp

@@@ -41,7 -46,12 +46,11 @@@ class munin::client 
                        err( "Don't know which munin plugins to install for $kernel" )
                }
        }
+       case $virtual {
+         physical: { include munin::plugins::physical }
+           xen0: { include munin::plugins::dom0 }
+         xenu: { include munin::plugins::domU }
+     }
 -
  }
  
  define munin::register()
@@@ -122,3 -132,64 +132,62 @@@ class munin::client::debia
        plugin { "postfix_mailvolume": ensure => absent }
  }
  
 -
 -
+ class munin::client::gentoo 
+ {
+     $acpi_available = "absent"
+     package { 'munin-node':
+                 name => 'munin',
+                 ensure => present,
+                 category => $operatingsystem ? {
+                         gentoo => 'net-analyzer',
+                         default => '',
+                 },
+     }
+       file {
+               "/etc/munin/":
+                       ensure => directory,
+                       mode => 0755, owner => root, group => 0;
+               "/etc/munin/munin-node.conf":
+                       content => template("munin/munin-node.conf.Gentoo."),
+                       mode => 0644, owner => root, group => 0,
+                       # this has to be installed before the package, so the postinst can
+                       # boot the munin-node without failure!
+                       before => Package["munin-node"],
+           #           notify => Service["munin"],
+       }
+       service { "munin-node":
+               ensure => running, 
+       }
+       munin::register { $fqdn: }
+ }
+ class munin::client::centos 
+ {
+     package { 'munin-node':
+                 ensure => present,
+     }
+       file {
+               "/etc/munin/":
+                       ensure => directory,
+                       mode => 0755, owner => root, group =>0;
+               "/etc/munin/munin-node.conf":
+                       content => template("munin/munin-node.conf.CentOS."),
+                       mode => 0644, owner => root, group => 0,
+                       # this has to be installed before the package, so the postinst can
+                       # boot the munin-node without failure!
+                       before => Package["munin-node"],
+                       notify => Service["munin-node"],
+       }
+       service { "munin-node":
+               ensure => running, 
+       }
+       munin::register { $fqdn: }
+ }
@@@ -12,13 -12,14 +12,14 @@@ class munin::hos
                dir => $NODESDIR,
                header => "/etc/munin/munin.conf.header",
        }
 -
 +      
-       file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", 
-               "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
-     ensure => present,
-     mode => 640, owner => munin, group => root;
-   }
-       
+     file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", 
+                "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
+         ensure => present,
+         mode => 640, owner => munin, group => 0;
+     }
+     include munin::plugins::muninhost
  }
  
  class munin::snmp_collector
@@@ -1,8 -1,7 +1,12 @@@
  # munin.pp - everything a sitewide munin installation needs
  # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
  # See LICENSE for the full license granted to you.
++<<<<<<< HEAD:manifests/init.pp
 +# adapted by Puzzle ITC - haerry+puppet(at)puzzle.ch
 +#
++=======
++>>>>>>> immerda/master:manifests/init.pp
  # the port is a parameter so vservers can share IP addresses and still be happy
  
  # Define where the individual nodes' configs are stored
@@@ -14,4 -13,7 +18,6 @@@ import "host.pp
  import "client.pp"
  import "plugin.pp"
  
- include assert_lsbdistcodename
+ case $operatingsystem {
+     debian,ubuntu: { include assert_lsbdistcodename }
+ }
 -