diff options
Diffstat (limited to 'manifests/defines')
-rw-r--r-- | manifests/defines/munin_node.pp | 21 |
1 files 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; } + } } |