diff --git a/bacula/manifests/init.pp b/bacula/manifests/init.pp index 9d758ed..537d348 100644 --- a/bacula/manifests/init.pp +++ b/bacula/manifests/init.pp @@ -408,6 +408,10 @@ class bacula::storage($password = undef) { define bacula::device($device, $media) { include bacula::storage + require smart + package { "mtx": + ensure => installed, + } file { "/etc/bacula/bacula-sd.d/${name}.conf": ensure => present, diff --git a/bacula/templates/device.conf.erb b/bacula/templates/device.conf.erb index 546066e..eec5b4f 100644 --- a/bacula/templates/device.conf.erb +++ b/bacula/templates/device.conf.erb @@ -7,4 +7,6 @@ Device { AlwaysOpen = no; RemovableMedia = yes; RandomAccess = no; + Alert Command = "sh -c 'tapeinfo -f %c | grep TapeAlert | cat'" + Alert Command = "sh -c 'smartctl -H -l error %c'" }