cleanup openbsd manual installation + remove unnecessary files
authormh <mh@immerda.ch>
Sun, 3 Nov 2013 16:46:46 +0000 (17:46 +0100)
committermh <mh@immerda.ch>
Sun, 3 Nov 2013 16:46:46 +0000 (17:46 +0100)
The manual OpenBSD installation is now so old and not needed
anymore.

files/openbsd/package/munin_openbsd.tar.gz [deleted file]
manifests/client.pp
manifests/client/base.pp
manifests/client/centos.pp [deleted file]
manifests/client/debian.pp
manifests/client/gentoo.pp
manifests/client/openbsd.pp
manifests/client/package.pp [deleted file]
manifests/plugins/centos.pp [deleted file]

diff --git a/files/openbsd/package/munin_openbsd.tar.gz b/files/openbsd/package/munin_openbsd.tar.gz
deleted file mode 100644 (file)
index 17ace1d..0000000
Binary files a/files/openbsd/package/munin_openbsd.tar.gz and /dev/null differ
index f91436f..b7cd5d4 100644 (file)
@@ -36,7 +36,7 @@ class munin::client(
       }
     }
     centos: {
-      class { 'munin::client::package':
+      class { 'munin::client::base':
         before => Anchor['munin::client::installed']
       }
     }
index 3c0ba89..e81028d 100644 (file)
@@ -1,10 +1,14 @@
 # Install a basic munin client
 class munin::client::base {
+  package { 'munin-node':
+    ensure => installed
+  }
   service { 'munin-node':
-    ensure     => running,
-    enable     => true,
-    hasstatus  => true,
-    hasrestart => true,
+    ensure      => running,
+    enable      => true,
+    hasstatus   => true,
+    hasrestart  => true,
+    require     => Package[munin-node],
   }
   file {'/etc/munin':
     ensure => directory,
@@ -14,6 +18,9 @@ class munin::client::base {
   }
   file {'/etc/munin/munin-node.conf':
     content => template("munin/munin-node.conf.${::operatingsystem}"),
+    # 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'],
     mode    => '0644',
     owner   => root,
diff --git a/manifests/client/centos.pp b/manifests/client/centos.pp
deleted file mode 100644 (file)
index cd4f2f6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Install a munin client on centos
-class munin::client::centos inherits munin::client::package {
-  include munin::plugins::centos
-}
index 3cfc3fc..f94356a 100644 (file)
@@ -1,11 +1,18 @@
 # Install the munin client on debian
-class munin::client::debian inherits munin::client::package {
+class munin::client::debian inherits munin::client::base {
   # the plugin will need that
-  package { 'iproute': ensure => installed }
+  package { 'iproute':
+    ensure => installed
+  }
+
+  $hasstatus = $::lsbdistcodename ? {
+    sarge => false,
+    default => true
+  }
 
   Service['munin-node']{
     # sarge's munin-node init script has no status
-    hasstatus => $::lsbdistcodename ? { sarge => false, default => true }
+    hasstatus => $hasstatus
   }
   File['/etc/munin/munin-node.conf']{
     content => template("munin/munin-node.conf.${::operatingsystem}.${::lsbdistcodename}"),
index 186950b..fde592f 100644 (file)
@@ -1,5 +1,5 @@
 # install a munin client on gentoo
-class munin::client::gentoo inherits munin::client::package {
+class munin::client::gentoo inherits munin::client::base {
 
   Package['munin-node'] {
     name     => 'munin',
index e3c18d5..5ced4c4 100644 (file)
@@ -1,53 +1,19 @@
-# currently we install munin on openbsd by targz
-# :(
-
+# generate a few missing things on openbsd
 class munin::client::openbsd inherits munin::client::base {
-  if $::operatingsystemrelease == '4.3' {
-    file{'/usr/src/munin_openbsd.tar.gz':
-      source  => 'puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz',
-      owner   => root,
-      group   => 0,
-      mode    => '0600';
-    }
-    exec{'extract_openbsd':
-      command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz',
-      unless  => 'test -d /opt/munin',
-      require => File['/usr/src/munin_openbsd.tar.gz'],
-      before  => File['/var/run/munin'],
-    }
-    package{'p5-Compress-Zlib':
-      ensure => installed,
-      before => File['/var/run/munin'],
-    }
-  } else {
-    package{'munin-node':
-      ensure => installed,
-    }
-  }
-  package{ [  'p5-Crypt-SSLeay', 'p5-HTML-Parser', 'p5-HTML-Tagset', 'p5-HTTP-GHTTP',
-              'p5-LWP-UserAgent-Determined', 'p5-Net-SSLeay', 'p5-Net-Server',
-              'p5-URI', 'p5-libwww', 'pcre', 'curl' ]:
-    ensure => installed,
-    before => File['/var/run/munin'],
-  }
   file{[ '/var/run/munin', '/var/log/munin' ]:
     ensure  => directory,
     owner   => root,
     group   => 0,
     mode    => '0755';
   }
-  $bin_loc = $::operatingsystemrelease ? {
-    '4.3'   => '/opt/munin/sbin/munin-node',
-    default => '/usr/local/sbin/munin-node'
-  }
   openbsd::rc_local{'munin-node':
-    binary  => $bin_loc,
+    binary  => '/usr/local/sbin/munin-node',
     require => File['/var/run/munin'],
   }
   Service['munin-node']{
     restart     => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`',
     stop        => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`',
-    start       => $bin_loc,
+    start       => '/usr/local/sbin/munin-node',
     status      => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^ *$(cat /var/run/munin/munin-node.pid).*munin-node")',
     hasstatus   => true,
     hasrestart  => true,
diff --git a/manifests/client/package.pp b/manifests/client/package.pp
deleted file mode 100644 (file)
index 0958202..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Install a munin client using packages
-class munin::client::package inherits munin::client::base {
-  package { 'munin-node': ensure => installed }
-  Service['munin-node']{
-    require => Package[munin-node],
-  }
-  File['/etc/munin/munin-node.conf']{
-    # this has to be installed before the package, so the postinst can
-    # boot the munin-node without failure!
-    before => Package['munin-node'],
-  }
-}
-
diff --git a/manifests/plugins/centos.pp b/manifests/plugins/centos.pp
deleted file mode 100644 (file)
index 0bb7697..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Install munin plugins for centos
-class munin::plugins::centos inherits munin::plugins::base {
-  munin::plugin { 'users':
-    ensure => present,
-  }
-}