From a90ef81bc6d1c8dd0446c218e08d64e3bf6a9062 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 31 May 2013 11:40:24 -0300 Subject: Introducing owner and group parameters at nodo::subsystem::media::folders --- manifests/subsystem/media/folders.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/manifests/subsystem/media/folders.pp b/manifests/subsystem/media/folders.pp index 2fcc637..3f812e7 100644 --- a/manifests/subsystem/media/folders.pp +++ b/manifests/subsystem/media/folders.pp @@ -1,5 +1,7 @@ class nodo::subsystem::media::folders( - $cache = hiera('nodo::subsystem::media::folders::cache', directory) + $cache = hiera('nodo::subsystem::media::folders::cache', directory), + $owner = hiera('nodo::subsystem::media::folders::owner', false), + $group = hiera('nodo::subsystem::media::folders::group', false) ) { # Removable media folder file { [ "/media/usb", "/media/cdrom", "/media/tablet", "/media/phone" ]: @@ -11,6 +13,14 @@ class nodo::subsystem::media::folders( file { "/var/cache/media": ensure => $cache, mode => 0755, + owner => $owner ? { + false => undef, + default => $owner, + }, + group => $group ? { + false => undef, + default => $group, + }, } # Data folder is a cache -- cgit v1.2.3