From 643f7ae9436fa9573c137963f23bbbcde6d2ca9b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 13 Sep 2015 20:42:36 -0300 Subject: Munin conditionals at nodo::role::nas --- manifests/role/nas.pp | 18 ++++++++---------- manifests/subsystem/nas/share.pp | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/manifests/role/nas.pp b/manifests/role/nas.pp index 536f9ca..a0a4c3d 100644 --- a/manifests/role/nas.pp +++ b/manifests/role/nas.pp @@ -82,11 +82,10 @@ class nodo::role::nas( server => true; } - munin::plugin { [ 'nfsd4' ]: - ensure => $munin ? { - true => present, - default => absent, - }, + if $munin == true { + munin::plugin { [ 'nfsd4' ]: + ensure => present, + } } } @@ -192,11 +191,10 @@ class nodo::role::nas( }, } - munin::plugin { [ 'samba' ]: - ensure => $munin ? { - true => present, - default => absent, - }, + if $munin == true { + munin::plugin { [ 'samba' ]: + ensure => present, + } } } diff --git a/manifests/subsystem/nas/share.pp b/manifests/subsystem/nas/share.pp index aee32f2..a5cac93 100644 --- a/manifests/subsystem/nas/share.pp +++ b/manifests/subsystem/nas/share.pp @@ -102,7 +102,7 @@ define nodo::subsystem::nas::share( # $avahi = hiera('nodo::role::nas::avahi', false) - if $avahi == true { + if $avahi == true and $nfs == true { file { "/etc/avahi/services/nfs-${name}.service": ensure => present, owner => root, -- cgit v1.2.3