]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
implement copy config option
authorAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 18:40:51 +0000 (14:40 -0400)
committerAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 18:40:51 +0000 (14:40 -0400)
manifests/server/share.pp

index 1c3888e60bbbd52141306082d20b1d1f692f5539..eb86168c1bd88b38c836c5d4a07f4cda7d9925b6 100644 (file)
@@ -2,6 +2,7 @@ define samba::server::share($ensure = present,
                     $comment = '',
                     $path = '',
                     $browsable = '',
+                    $copy = '',
                     $create_mask = '',
                     $guest_ok = '',
                     $read_only = '') {
@@ -51,6 +52,16 @@ define samba::server::share($ensure = present,
       notify => Class["samba::server::service"]
     }
 
+    augeas { "${name}-copy":
+      context => $context,
+      changes => $copy ? {
+        default => "set ${target}/copy '${copy}'",
+        '' => "rm ${target}/copy",
+      },
+      require => Augeas["${name}-section"],
+      notify => Class["samba::server::service"]
+    }
+
     augeas { "${name}-create_mask":
       context => $context,
       changes => $create_mask ? {