From 5f3e1542ba42a1991933af0e82eb60668fd2fe20 Mon Sep 17 00:00:00 2001 From: Adam Jahn Date: Fri, 24 Aug 2012 15:03:49 -0400 Subject: implement force user/group config options --- manifests/server/share.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 ? { -- cgit v1.2.3