diff options
author | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:08:13 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:08:13 -0400 |
commit | 117c73ee3eee4eda23bcb7c5625337db12b7caad (patch) | |
tree | 1f0fe17e74b420eb454ebf2c00ae1a14f1b8441f | |
parent | 5f3e1542ba42a1991933af0e82eb60668fd2fe20 (diff) | |
download | puppet-samba-117c73ee3eee4eda23bcb7c5625337db12b7caad.tar.gz puppet-samba-117c73ee3eee4eda23bcb7c5625337db12b7caad.tar.bz2 |
implement guest only config option
-rw-r--r-- | manifests/server/share.pp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp index 10d8696..64f4d82 100644 --- a/manifests/server/share.pp +++ b/manifests/server/share.pp @@ -10,6 +10,7 @@ define samba::server::share($ensure = present, $force_group = '', $force_user = '', $guest_ok = '', + $guest_only = '', $read_only = '') { $context = "/files/etc/samba/smb.conf" @@ -138,6 +139,17 @@ define samba::server::share($ensure = present, notify => Class["samba::server::service"] } + augeas { "${name}-guest_only": + context => $context, + changes => $guest_only ? { + true => "set \"${target}/guest only\" yes", + false => "set \"${target}/guest only\" no", + default => "rm \"${target}/guest only\"", + }, + require => Augeas["${name}-section"], + notify => Class["samba::server::service"] + } + augeas { "${name}-read_only": context => $context, changes => $read_only ? { |