diff options
-rw-r--r-- | manifests/server/share.pp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp index b8e508c..2e0c0ba 100644 --- a/manifests/server/share.pp +++ b/manifests/server/share.pp @@ -15,7 +15,10 @@ define samba::server::share($ensure = present, $read_only = '', $public = '', $writable = '', - $printable = '') { + $printable = '', + $valid_users = '', + ) { + $incl = $samba::server::incl $context = $samba::server::context $target = "target[. = '${name}']" @@ -119,5 +122,15 @@ define samba::server::share($ensure = present, require => Augeas["${name}-section"], notify => Class['samba::server::service'] } + + augeas { "${name}-valid_users": + context => $context, + changes => $printable ? { + default => "set ${target}/valid users '${valid_users}'", + '' => "rm ${target}/valid users", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } } } |