aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2012-08-24 15:57:09 -0400
committerAdam Jahn <ajjahn@gmail.com>2012-08-24 15:57:09 -0400
commit612a665754f58ac76bb2ed590f077d34db6d34f6 (patch)
tree9a37e37645d68576ef085b7b9af3db88801e427b /manifests
parent35c5fad8f6f4703d9ac762f88d82072a50a064f6 (diff)
downloadpuppet-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
Diffstat (limited to 'manifests')
-rw-r--r--manifests/server.pp13
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 ? {