]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
interface and bind interface only options, bundled these together cause I can't think...
authorAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 19:57:09 +0000 (15:57 -0400)
committerAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 19:57:09 +0000 (15:57 -0400)
manifests/server.pp

index b8e94b0bee5eb27a44b9a755b6eb3789f0e6f1ae..b3de6616cd2c34511fe7cbd27a9c2b51ba1b24f7 100644 (file)
@@ -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 ? {