aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/munin.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:18:39 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:18:39 -0200
commitad27f5dac1870369abe10e88fbb034ffa391f12c (patch)
tree2ec4be14af75dbc7508d490ed552288973e3a006 /manifests/subsystems/munin.pp
parent9c64cff37985a26f7aac5474928403f2605c588f (diff)
downloadpuppet-nodo-ad27f5dac1870369abe10e88fbb034ffa391f12c.tar.gz
puppet-nodo-ad27f5dac1870369abe10e88fbb034ffa391f12c.tar.bz2
Lots of subsystem refactoring; minor node changes
Diffstat (limited to 'manifests/subsystems/munin.pp')
-rw-r--r--manifests/subsystems/munin.pp22
1 files changed, 10 insertions, 12 deletions
diff --git a/manifests/subsystems/munin.pp b/manifests/subsystems/munin.pp
index f29afb8..a0a534e 100644
--- a/manifests/subsystems/munin.pp
+++ b/manifests/subsystems/munin.pp
@@ -1,19 +1,17 @@
# Define a munin node
-define munin_node($port = '4949') {
+define munin_node(
+ $port = hiera('nodo::munin_node::port', '4949'),
+ $allow = hiera('nodo::munin_node::allow', ''),
+ $host = hiera('nodo::munin_node::host', '')
+) {
- case $global_munin_allow {
- '': { fail("Please set \$global_munin_allow in your site config") }
+ case $allow {
+ '': { fail("Please set nodo::munin_node::allow in your site config") }
}
- $munin_allow = $node_munin_allow ? {
- '' => "$global_munin_allow",
- default => "$node_munin_allow",
- }
-
- $munin_port = $node_munin_port ? {
- '' => "$port",
- default => "$node_munin_port",
- }
+ $munin_port = $port
+ $munin_allow = $allow
+ $munin_host = $host
include munin::client
munin::plugin { apt_all: ensure => present; }