]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
implement global security option
authorAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 20:07:22 +0000 (16:07 -0400)
committerAdam Jahn <ajjahn@gmail.com>
Fri, 24 Aug 2012 20:07:22 +0000 (16:07 -0400)
manifests/server.pp

index b3de6616cd2c34511fe7cbd27a9c2b51ba1b24f7..66d10b1c17586c40cf432f6f7727c38c41f99473 100644 (file)
@@ -1,4 +1,5 @@
 class samba::server($interfaces = '',
+                    $security = '',
                     $server_string = '',
                     $workgroup = '') {
 
@@ -26,6 +27,16 @@ class samba::server($interfaces = '',
     notify => Class['samba::server::service']
   }
 
+  augeas { 'global-security':
+    context => $context,
+    changes => $security ? {
+      default => "set \"${target}/security\" '$security'",
+      '' => "rm \"${target}/security\"",
+    },
+    require => Augeas['global-section'],
+    notify => Class['samba::server::service']
+  }
+
   augeas { 'global-server_string':
     context => $context,
     changes => $server_string ? {