diff options
author | Adam Jahn <ajjahn@gmail.com> | 2014-01-20 08:22:57 -0800 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2014-01-20 08:22:57 -0800 |
commit | cefcad0c6e291d436a84939b257de9f32964534f (patch) | |
tree | 4e2d2dce49a8c3122f4aec82c3eb72bd98cc4b35 /manifests/server/option.pp | |
parent | 7d0c9a893efae039252e754ed7750b4bcdf25f9a (diff) | |
parent | f321b3a1e0fbed665ef92776dffb1abb064a9f84 (diff) | |
download | puppet-samba-cefcad0c6e291d436a84939b257de9f32964534f.tar.gz puppet-samba-cefcad0c6e291d436a84939b257de9f32964534f.tar.bz2 |
Merge pull request #23 from megabass/samba_server_option
moved set_samba_option to own file an renamed it to samba::server::option
Diffstat (limited to 'manifests/server/option.pp')
-rw-r--r-- | manifests/server/option.pp | 19 |
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 |