aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/option.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/server/option.pp')
-rw-r--r--manifests/server/option.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/server/option.pp b/manifests/server/option.pp
new file mode 100644
index 0000000..36968fc
--- /dev/null
+++ b/manifests/server/option.pp
@@ -0,0 +1,19 @@
+define samba::server::option ( $value = '' ) {
+ $incl = $samba::server::incl
+ $context = $samba::server::context
+ $target = $samba::server::target
+
+ $changes = $value ? {
+ default => "set \"${target}/$name\" \"$value\"",
+ '' => "rm ${target}/$name",
+ }
+
+ augeas { "samba-$name":
+ incl => $incl,
+ lens => 'Samba.lns',
+ context => $context,
+ changes => $changes,
+ require => Augeas['global-section'],
+ notify => Class['Samba::Server::Service']
+ }
+} \ No newline at end of file