From 2840163c18401c7d627a498857aef43859f66454 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 7 Mar 2015 18:58:57 -0300 Subject: Introduces nodo::munin_node::ensure --- manifests/defines/munin_node.pp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/manifests/defines/munin_node.pp b/manifests/defines/munin_node.pp index f867fd3..654edaa 100644 --- a/manifests/defines/munin_node.pp +++ b/manifests/defines/munin_node.pp @@ -1,5 +1,6 @@ # Define a munin node define munin_node( + $ensure = hiera('nodo::munin_node::ensure', 'present'), $port = hiera('nodo::munin_node::port', '4949'), $allow = hiera('nodo::munin_node::allow', ''), $host = hiera('nodo::munin_node::host', $::fqdn), @@ -12,16 +13,18 @@ define munin_node( } package { "munin-plugins-extra": - ensure => "present", + ensure => $ensure, } - class { 'munin::client': - port => $port, - allow => $allow, - host => $host, - listen => $listen, - config => $config, - } + if ($ensure == 'present') { + class { 'munin::client': + port => $port, + allow => $allow, + host => $host, + listen => $listen, + config => $config, + } - munin::plugin { apt_all: ensure => present; } + munin::plugin { apt_all: ensure => present; } + } } -- cgit v1.2.3