diff options
author | Adam Jahn <ajjahn@gmail.com> | 2014-01-20 08:23:11 -0800 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2014-01-20 08:23:11 -0800 |
commit | eb089b5b477b08ee1b8c211bb33b6fdf67ca887f (patch) | |
tree | 5e331256b0bd93486b1151ffaa40d746cfd720bd /manifests/server | |
parent | cefcad0c6e291d436a84939b257de9f32964534f (diff) | |
parent | fbe99d36b98a131df70923894896e01caae75ada (diff) | |
download | puppet-samba-eb089b5b477b08ee1b8c211bb33b6fdf67ca887f.tar.gz puppet-samba-eb089b5b477b08ee1b8c211bb33b6fdf67ca887f.tar.bz2 |
Merge pull request #25 from ngiger/master
Support op_locks and write_lists
Diffstat (limited to 'manifests/server')
-rw-r--r-- | manifests/server/share.pp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/manifests/server/share.pp b/manifests/server/share.pp index b7274f9..2233d45 100644 --- a/manifests/server/share.pp +++ b/manifests/server/share.pp @@ -12,8 +12,12 @@ define samba::server::share($ensure = present, $guest_ok = '', $guest_only = '', $path = '', + $op_locks = '', + $level2_oplocks = '', + $veto_oplock_files = '', $read_only = '', $public = '', + $write_list = '', $writable = '', $printable = '', $valid_users = '', @@ -132,5 +136,43 @@ define samba::server::share($ensure = present, require => Augeas["${name}-section"], notify => Class['samba::server::service'] } + + augeas { "${name}-op_locks": + context => $context, + changes => $op_locks ? { + default => "set \"${target}/oplocks\" '${op_locks}'", + '' => "rm \"${target}/oplocks\"", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } + augeas { "${name}-level2_oplocks": + context => $context, + changes => $level2_oplocks ? { + default => "set \"${target}/level2 oplocks\" '${level2_oplocks}'", + '' => "rm \"${target}/level2 oplocks\"", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } + augeas { "${name}-veto_oplock_files": + context => $context, + changes => $veto_oplock_files ? { + default => "set \"${target}/veto oplock files\" '${veto_oplock_files}'", + '' => "rm \"${target}/veto oplock files\"", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } + augeas { "${name}-write_list": + context => $context, + changes => $write_list ? { + default => "set \"${target}/write list\" '${write_list}'", + '' => "rm \"${target}/write list\"", + }, + require => Augeas["${name}-section"], + notify => Class['samba::server::service'] + } + } } |