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.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.pp')
-rw-r--r-- | manifests/server.pp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/manifests/server.pp b/manifests/server.pp index 2e4c2d9..7003057 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -22,8 +22,7 @@ class samba::server($interfaces = '', notify => Class['samba::server::service'] } - - set_samba_option { + samba::server::option { 'interfaces': value => $interfaces; 'bind interfaces only': value => $bind_interfaces_only; 'security': value => $security; @@ -49,24 +48,5 @@ class samba::server($interfaces = '', mode => "0755", content => template("${module_name}/add_samba_user"), } -} - -define set_samba_option ( $value = '', $signal = 'samba::server::service' ) { - $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[$signal] - } } |