diff options
author | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:03:49 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:03:49 -0400 |
commit | 5f3e1542ba42a1991933af0e82eb60668fd2fe20 (patch) | |
tree | aa53ee1f9ce1b6cce8349883c451c32a58dcbea9 /manifests/server/share.pp | |
parent | cdbc1eaa757a3343e8417e4952908162310f8de5 (diff) | |
download | puppet-samba-5f3e1542ba42a1991933af0e82eb60668fd2fe20.tar.gz puppet-samba-5f3e1542ba42a1991933af0e82eb60668fd2fe20.tar.bz2 |
implement force user/group config options
Diffstat (limited to 'manifests/server/share.pp')
-rw-r--r-- | manifests/server/share.pp | 22 |
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 ? { |