From ad27f5dac1870369abe10e88fbb034ffa391f12c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Jan 2013 13:18:39 -0200 Subject: Lots of subsystem refactoring; minor node changes --- manifests/subsystems/munin.pp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'manifests/subsystems/munin.pp') 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; } -- cgit v1.2.3