summaryrefslogtreecommitdiff
path: root/manifests/client/openbsd.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2014-12-13 09:34:56 -0500
committerGabriel Filion <gabster@lelutin.ca>2014-12-13 10:21:25 -0500
commit48272434978f95c70e34aebe9ce188157f8f935e (patch)
tree8c940d891cbcba026d56cf8ed2935361debc44fd /manifests/client/openbsd.pp
parent7e03247a9e219fe8e57d544957eb06e305e69fc1 (diff)
parent27c9a5dbc2083dcc20d059008702dd3f75382bcc (diff)
Merge remote-tracking branch 'immerda/master' into merge_immerda
Conflicts: manifests/plugins/interfaces.pp $real_ifs was changed on master and we'd like to keep that change $ifs was changed to use the prefix() function and we'd like to keep that change.
Diffstat (limited to 'manifests/client/openbsd.pp')
-rw-r--r--manifests/client/openbsd.pp46
1 files changed, 6 insertions, 40 deletions
diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp
index cd21abf..09fb24f 100644
--- a/manifests/client/openbsd.pp
+++ b/manifests/client/openbsd.pp
@@ -1,60 +1,26 @@
-# 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' ]:
+ file{[ '/var/run/munin', '/var/log/munin-node' ]:
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,
- require => [ File['/var/run/munin'], File['/var/log/munin'] ],
+ require => [ File['/var/run/munin'], File['/var/log/munin-node'] ],
}
cron{'clean_munin_logfile':
- command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`',
+ command => 'rm /var/log/munin-node/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`',
minute => 0,
hour => 2,
weekday => 0,