From 9d0bb54276ee846440a71798c65941502a1c10db Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 30 May 2013 22:58:30 -0300 Subject: Parametrizing firewall::nas --- manifests/role/nas.pp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'manifests/role/nas.pp') diff --git a/manifests/role/nas.pp b/manifests/role/nas.pp index 428f23b..bae8b66 100644 --- a/manifests/role/nas.pp +++ b/manifests/role/nas.pp @@ -2,9 +2,6 @@ class nodo::role::nas { # Minimal utilities include nodo::utils::network::minimal - # Firewall rules - include firewall::nas - # Media folders and groups include nodo::subsystem::media @@ -27,7 +24,11 @@ class nodo::role::nas { # http://lists.freedesktop.org/archives/avahi/2006-July/000824.html # http://cups.org/documentation.php/doc-1.6/ref-cupsd-conf.html#BrowseLocalProtocols # http://www.dns-sd.org/ServiceTypes.html - include avahi + $avahi = hiera('nodo::role::nas::avahi', false) + + if $avahi == true { + include avahi + } # DLNA $dlna = hiera('nodo::role::nas::dlna', false) @@ -233,6 +234,15 @@ class nodo::role::nas { } } + # + # Torrent + # + $torrent = hiera('nodo::role::nas::torrent', false) + + if $torrent == true { + include pyroscope + } + # # DAAP # @@ -249,4 +259,19 @@ class nodo::role::nas { # music_dir => '/var/cache/media/noise', # } #} + + # Firewall rules + class { 'firewall::nas': + ftp => $ftp, + tftp => $tftp, + http => $http, + nfsd => $nfs, + rsync => $rsync, + printer => $cups, + torrent => $torrent, + mpd => $mpd, + samba => $samba, + dlna => $dlna, + #daap => $daap, + } } -- cgit v1.2.3