Move device name, media type name, and archive device construction to the manifest
[mirror/dsa-puppet.git] / modules / bacula / manifests / storage / client.pp
index 3b03a75..7aa0428 100644 (file)
@@ -8,6 +8,10 @@ define bacula::storage::client(
 ) {
   include bacula::storage
 
+  $device_name     = "${bacula::storage::filestor_device}-${client}"
+  $media_type_name = "${bacula::storage::filestor_name}-${client}"
+  $directory       = "${bacula::storage::backup_path}/${client}"
+
   file {
     "/etc/bacula/storage-conf.d/${client}.conf":
       content => template('bacula/storage/sd-per-client.conf.erb'),
@@ -15,7 +19,7 @@ define bacula::storage::client(
       group   => bacula,
       notify  => Exec['bacula-sd restart-when-idle'],
       ;
-    "${bacula::storage::backup_path}/${client}":
+    $directory:
       ensure => directory,
       mode   => '0755',
       owner  => bacula,
@@ -23,4 +27,3 @@ define bacula::storage::client(
       ;
   }
 }
-