diff options
author | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:57:09 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2012-08-24 15:57:09 -0400 |
commit | 612a665754f58ac76bb2ed590f077d34db6d34f6 (patch) | |
tree | 9a37e37645d68576ef085b7b9af3db88801e427b | |
parent | 35c5fad8f6f4703d9ac762f88d82072a50a064f6 (diff) | |
download | puppet-samba-612a665754f58ac76bb2ed590f077d34db6d34f6.tar.gz puppet-samba-612a665754f58ac76bb2ed590f077d34db6d34f6.tar.bz2 |
interface and bind interface only options, bundled these together cause I can't think of a reason you'd set the interfaces without bind interfaces only
-rw-r--r-- | manifests/server.pp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/manifests/server.pp b/manifests/server.pp index b8e94b0..b3de661 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,4 +1,5 @@ -class samba::server($server_string = '', +class samba::server($interfaces = '', + $server_string = '', $workgroup = '') { include samba::server::install @@ -15,6 +16,16 @@ class samba::server($server_string = '', notify => Class['samba::server::service'] } + augeas { 'global-interfaces': + context => $context, + changes => $interfaces ? { + default => ["set \"${target}/interfaces\" '$interfaces'", "set \"${target}/bind interfaces only\" yes"], + '' => ["rm \"${target}/interfaces\"", "rm \"${target}/bind interfaces only\""], + }, + require => Augeas['global-section'], + notify => Class['samba::server::service'] + } + augeas { 'global-server_string': context => $context, changes => $server_string ? { |