aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2012-08-24 14:57:21 -0400
committerAdam Jahn <ajjahn@gmail.com>2012-08-24 14:57:21 -0400
commitcdbc1eaa757a3343e8417e4952908162310f8de5 (patch)
treeb5ad596035e946d2dc0c72d12df8394a65ae4156 /manifests/server
parentfb1899e32711bc1f669608aae1dafb23eb70ca73 (diff)
downloadpuppet-samba-cdbc1eaa757a3343e8417e4952908162310f8de5.tar.gz
puppet-samba-cdbc1eaa757a3343e8417e4952908162310f8de5.tar.bz2
implement force masks config options
Diffstat (limited to 'manifests/server')
-rw-r--r--manifests/server/share.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp
index 99ecb13..1bf3b5e 100644
--- a/manifests/server/share.pp
+++ b/manifests/server/share.pp
@@ -5,6 +5,8 @@ define samba::server::share($ensure = present,
$copy = '',
$create_mask = '',
$directory_mask = '',
+ $force_create_mask = '',
+ $force_directory_mask = '',
$guest_ok = '',
$read_only = '') {
@@ -83,6 +85,26 @@ define samba::server::share($ensure = present,
notify => Class["samba::server::service"]
}
+ augeas { "${name}-force_create_mask":
+ context => $context,
+ changes => $force_create_mask ? {
+ default => "set \"${target}/force create mask\" '${force_create_mask}'",
+ '' => "rm \"${target}/force create mask\"",
+ },
+ require => Augeas["${name}-section"],
+ notify => Class["samba::server::service"]
+ }
+
+ augeas { "${name}-force_directory_mask":
+ context => $context,
+ changes => $force_directory_mask ? {
+ default => "set \"${target}/force directory mask\" '${force_directory_mask}'",
+ '' => "rm \"${target}/force directory mask\"",
+ },
+ require => Augeas["${name}-section"],
+ notify => Class["samba::server::service"]
+ }
+
augeas { "${name}-guest_ok":
context => $context,
changes => $guest_ok ? {