summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client/base.pp4
-rw-r--r--manifests/client/debian.pp3
-rw-r--r--manifests/client/params.pp19
3 files changed, 21 insertions, 5 deletions
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index e81028d..71531fa 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -1,5 +1,5 @@
# Install a basic munin client
-class munin::client::base {
+class munin::client::base inherits munin::client::params {
package { 'munin-node':
ensure => installed
}
@@ -17,7 +17,7 @@ class munin::client::base {
group => 0,
}
file {'/etc/munin/munin-node.conf':
- content => template("munin/munin-node.conf.${::operatingsystem}"),
+ 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'],
diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp
index 63a0e14..f1bbb3c 100644
--- a/manifests/client/debian.pp
+++ b/manifests/client/debian.pp
@@ -12,9 +12,6 @@ class munin::client::debian inherits munin::client::base {
# sarge's munin-node init script has no status
hasstatus => $hasstatus
}
- File['/etc/munin/munin-node.conf']{
- content => template("munin/munin-node.conf.${::operatingsystem}.${::lsbdistcodename}"),
- }
# workaround bug in munin_node_configure
plugin { 'postfix_mailvolume': ensure => absent }
include munin::plugins::debian
diff --git a/manifests/client/params.pp b/manifests/client/params.pp
new file mode 100644
index 0000000..14d3749
--- /dev/null
+++ b/manifests/client/params.pp
@@ -0,0 +1,19 @@
+# Set the parameters for the munin client
+class munin::client::params {
+ $user = 'root'
+
+ case $::operatingsystem {
+ 'OpenBSD': {
+ $group = '0'
+ $log_file = '/var/log/munin-node/munin-node.log'
+ }
+ 'Debian': {
+ $group = 'root'
+ $log_file = '/var/log/munin/munin-node.log'
+ }
+ default: {
+ $group = 'root'
+ $log_file = '/var/log/munin-node/munin-node.log'
+ }
+ }
+}