]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
More samba parameters at nodo::nas::share
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 6 Apr 2013 03:59:20 +0000 (00:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 6 Apr 2013 03:59:20 +0000 (00:59 -0300)
manifests/nas/share.pp

index beeb0591d1ac1c58e4a64f8de90b585a93810a9d..44677cbf0798db541c829d3327a6fc9c5366f48c 100644 (file)
@@ -2,12 +2,15 @@
 define nodo::nas::share(
   $description,
   $folder,
-  $dlna_type          = '',
-  $nfs_export_target  = '127.0.0.1',
-  $nfs_export_options = 'ro,sync,no_subtree_check',
-  $samba_guest_only   = true,
-  $samba_guest_ok     = true,
-  $samba_force_group  = ''
+  $dlna_type            = '',
+  $nfs_export_target    = '127.0.0.1',
+  $nfs_export_options   = 'ro,sync,no_subtree_check',
+  $samba_guest_only     = true,
+  $samba_guest_ok       = true,
+  $samba_force_group    = '',
+  $samba_read_only      = '',
+  $samba_create_mask    = '0644',
+  $samba_directory_mask = '0755'
 ) {
 
   # DLNA share
@@ -31,9 +34,19 @@ define nodo::nas::share(
       ''      => undef,
       default => $samba_force_group,
     },
+    read_only    => $samba_read_only ? {
+      ''      => undef,
+      default => $samba_read_only,
+    },
+    create_mask    => $samba_create_mask ? {
+      ''      => undef,
+      default => $samba_create_mask,
+    },
+    directory_mask    => $samba_directory_mask ? {
+      ''      => undef,
+      default => $samba_directory_mask,
+    },
     browsable      => true,
-    create_mask    => 0777,
-    directory_mask => 0777,
   }
 
   # NFS export