summaryrefslogtreecommitdiff
path: root/manifests/client/base.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-16 22:03:36 +0100
committervarac <varacanero@zeromail.org>2016-03-16 22:03:36 +0100
commit6c633f8606e04aad29f40a3fc0fcfdcb4b293715 (patch)
tree63d7c8a54a643cc628b9b4f7a3b941d9f508c4ad /manifests/client/base.pp
parent503e9296860e4d844a1ee391331996db87e0bfa6 (diff)
parent87dc315597e8ed27c2e0907615ede8a3f1521b7a (diff)
Merge remote-tracking branch 'shared/master' into leap_masterHEADmaster
Diffstat (limited to 'manifests/client/base.pp')
-rw-r--r--manifests/client/base.pp48
1 files changed, 32 insertions, 16 deletions
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index 78398a9..8ee8b95 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -1,28 +1,44 @@
-class munin::client::base {
+# Install a basic munin client
+class munin::client::base inherits munin::client::params {
+ package { 'munin-node':
+ ensure => installed
+ }
service { 'munin-node':
- ensure => running,
- enable => true,
- hasstatus => true,
+ ensure => running,
+ enable => true,
+ hasstatus => true,
hasrestart => true,
+ require => Package[munin-node],
}
file {'/etc/munin':
ensure => directory,
- mode => 0755, owner => root, group => 0;
+ mode => '0755',
+ owner => root,
+ group => 0,
}
file {'/etc/munin/munin-node.conf':
- content => template("munin/munin-node.conf.${::operatingsystem}"),
- notify => Service['munin-node'],
- mode => 0644, owner => root, group => 0,
+ content => template("${module_name}/munin-node.conf.erb"),
+ # 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,
+ group => 0,
+ }
+ $host = $munin::host ? {
+ '*' => $::fqdn,
+ default => $munin::host
}
munin::register { $::fqdn:
- host => $munin::client::host ? {
- '*' => $::fqdn,
- default => $munin::client::host
- },
- port => $munin::client::port,
- use_ssh => $munin::client::use_ssh,
- config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'],
- export_tag => $munin::client::export_tag,
+ host => $host,
+ port => $munin::port,
+ use_ssh => $munin::use_ssh,
+ description => $munin::description,
+ group => $munin::munin_group,
+ config => [ 'use_node_name yes', 'load.load.warning 5',
+ 'load.load.critical 10'],
+ export_tag => $munin::export_tag,
}
include munin::plugins::base
}