From f321b3a1e0fbed665ef92776dffb1abb064a9f84 Mon Sep 17 00:00:00 2001 From: Vladislav Nazarenko Date: Fri, 17 Jan 2014 13:55:55 +0100 Subject: moved set_samba_option to own file an renamed it to samba::server::option --- manifests/server/option.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 manifests/server/option.pp (limited to 'manifests/server/option.pp') 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 -- cgit v1.2.3