From d7bc114c20bb69914717d903ee913bae0879c5a6 Mon Sep 17 00:00:00 2001 From: Adam Jahn Date: Fri, 24 Aug 2012 15:27:11 -0400 Subject: implement guest account config option --- manifests/server/share.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'manifests') diff --git a/manifests/server/share.pp b/manifests/server/share.pp index 64f4d82..22686b5 100644 --- a/manifests/server/share.pp +++ b/manifests/server/share.pp @@ -9,6 +9,7 @@ define samba::server::share($ensure = present, $force_directory_mask = '', $force_group = '', $force_user = '', + $guest_account = '', $guest_ok = '', $guest_only = '', $read_only = '') { @@ -128,6 +129,16 @@ define samba::server::share($ensure = present, notify => Class["samba::server::service"] } + augeas { "${name}-guest_account": + context => $context, + changes => $guest_account ? { + default => "set \"${target}/guest account\" '${guest_account}'", + '' => "rm \"${target}/guest account\"", + }, + require => Augeas["${name}-section"], + notify => Class["samba::server::service"] + } + augeas { "${name}-guest_ok": context => $context, changes => $guest_ok ? { -- cgit v1.2.3