aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/share.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/server/share.pp')
-rw-r--r--manifests/server/share.pp42
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']
+ }
+
}
}