]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Use $name rather than $client, syntax, syntax, syntax
authorTollef Fog Heen <tfheen@err.no>
Sat, 16 Jun 2012 09:19:42 +0000 (11:19 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sat, 16 Jun 2012 09:19:42 +0000 (11:19 +0200)
modules/bacula/manifests/director.pp

index 513d0968669cd58af5c1c1b829e02968003a39cd..e4ec300a46da060d7fdbcf7169558569393b29a8 100644 (file)
@@ -35,13 +35,13 @@ class bacula::director inherits bacula {
       refreshonly => true;
   }
 
-  define bacula_client($client) {
+  define bacula_client() {
     # These must be kept in sync with the settings in bacula.pp
-    $bacula_client_name       = "$client-fd"
-    $bacula_client_secret     = hmac("/etc/puppet/secret", "bacula-fd-$client")
+    $bacula_client_name       = "${name}-fd"
+    $bacula_client_secret     = hmac("/etc/puppet/secret", "bacula-fd-${name}")
 
     file {
-      "/etc/bacula/conf.d/$client.conf":
+      "/etc/bacula/conf.d/${name}.conf":
       content => template("bacula/per-client.conf.erb"),
       mode => 440,
       group => bacula,
@@ -49,6 +49,7 @@ class bacula::director inherits bacula {
       ;
     }
   }
+  $allhosts = keys($site::allnodeinfo)
 
-  bacula_client { allnodeinfo('hostname', '') }
+  bacula_client { $allhosts: }
 }