backup-path should be something that only the storage system should need to care...
[mirror/dsa-puppet.git] / modules / bacula / manifests / storage_per_node.pp
index 2ed19a3..e6f8425 100644 (file)
@@ -1,28 +1,26 @@
 # bacula storage for node.  This is stored config by a client, collected on the storage
 define bacula::storage_per_node() {
+  include bacula::storage
 
-       include bacula
+  $bacula_filestor_device = $bacula::bacula_filestor_device
+  $bacula_filestor_name   = $bacula::bacula_filestor_name
 
-       $bacula_filestor_device = $bacula::bacula_filestor_device
-       $bacula_filestor_name   = $bacula::bacula_filestor_name
-       $bacula_backup_path     = $bacula::bacula_backup_path
+  $bacula_client_name   = "${name}-fd"
+  $client               = $name
 
-       $bacula_client_name   = "${name}-fd"
-       $client               = $name
-
-       file {
-               "/etc/bacula/storage-conf.d/${name}.conf":
-                       content => template('bacula/storage-per-client.conf.erb'),
-                       mode    => '0440',
-                       group   => bacula,
-                       notify  => Exec['bacula-sd restart-when-idle'],
-                       ;
-               "${bacula_backup_path}/${name}":
-                       ensure  => directory,
-                       mode    => '0755',
-                       owner   => bacula,
-                       group   => bacula,
-                       ;
-       }
+  file {
+    "/etc/bacula/storage-conf.d/${name}.conf":
+      content => template('bacula/storage-per-client.conf.erb'),
+      mode    => '0440',
+      group   => bacula,
+      notify  => Exec['bacula-sd restart-when-idle'],
+      ;
+    "${bacula::storage::backup_path}/${name}":
+      ensure => directory,
+      mode   => '0755',
+      owner  => bacula,
+      group  => bacula,
+      ;
+  }
 }