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

index 45eb51649f852680f61cc2b796e141241f304675..7f5e6795ba41ed60c74f6d18b2dedd049a50d5d0 100644 (file)
@@ -1,4 +1,5 @@
-class samba::server($workgroup = '') {
+class samba::server($workgroup = '',
+                    $server_string = '') {
   include samba::server::install
   include samba::server::config
   include samba::server::service
@@ -21,4 +22,14 @@ class samba::server($workgroup = '') {
     require => Augeas['global-section'],
   }
 
+  augeas { 'global-server_string':
+    context => $context,
+    changes => $server_string ? {
+      default => "set \"${target}/server string\" '$server_string'",
+      '' => "rm \"${target}/server string\"",
+    },
+    require => Augeas['global-section'],
+    notify => Class['samba::server::service']
+  }
+
 }