diff options
Diffstat (limited to 'manifests/subsystems/munin.pp')
-rw-r--r-- | manifests/subsystems/munin.pp | 22 |
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; } |