aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
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 1bf3b5e..10d8696 100644
--- a/manifests/server/share.pp
+++ b/manifests/server/share.pp
@@ -7,6 +7,8 @@ define samba::server::share($ensure = present,
$directory_mask = '',
$force_create_mask = '',
$force_directory_mask = '',
+ $force_group = '',
+ $force_user = '',
$guest_ok = '',
$read_only = '') {
@@ -105,6 +107,26 @@ define samba::server::share($ensure = present,
notify => Class["samba::server::service"]
}
+ augeas { "${name}-force_group":
+ context => $context,
+ changes => $force_group ? {
+ default => "set \"${target}/force group\" '${force_group}'",
+ '' => "rm \"${target}/force group\"",
+ },
+ require => Augeas["${name}-section"],
+ notify => Class["samba::server::service"]
+ }
+
+ augeas { "${name}-force_user":
+ context => $context,
+ changes => $force_user ? {
+ default => "set \"${target}/force user\" '${force_user}'",
+ '' => "rm \"${target}/force user\"",
+ },
+ require => Augeas["${name}-section"],
+ notify => Class["samba::server::service"]
+ }
+
augeas { "${name}-guest_ok":
context => $context,
changes => $guest_ok ? {