aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authorNiklaus Giger <niklaus.giger@member.fsf.org>2014-01-19 16:39:14 +0100
committerNiklaus Giger <niklaus.giger@member.fsf.org>2014-01-19 17:26:29 +0100
commitfbe99d36b98a131df70923894896e01caae75ada (patch)
treea456a3413c587d829d1299520fb1092d9a5716d4 /manifests/server
parent7d0c9a893efae039252e754ed7750b4bcdf25f9a (diff)
downloadpuppet-samba-fbe99d36b98a131df70923894896e01caae75ada.tar.gz
puppet-samba-fbe99d36b98a131df70923894896e01caae75ada.tar.bz2
Support op_locks and write_lists
Diffstat (limited to 'manifests/server')
-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']
+ }
+
}
}