X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/e4d7de6289263f15e40e529855f84b9b38be3fe3..839ad56c90d3979fffbb9c18d0f2d10eb6f56566:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index a0544149c..d26667436 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -86,6 +86,7 @@ if manufacturer == "HP" %w[/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 %/usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so].each do |filename| file filename do action :delete + manage_symlink_source false end end @@ -200,6 +201,24 @@ service "lldpd" do supports :status => true, :restart => true, :reload => true end +if node[:hardware][:mcelog][:enabled] + package "mcelog" + + %w[bus cache dimm iomca page socket-memory unknown].each do |trigger| + template "/etc/mcelog/#{trigger}-error-trigger.local" do + source "mcelog-trigger.erb" + owner "root" + group "root" + mode 0o755 + end + end + + service "mcelog" do + action [:start, :enable] + supports :status => true, :restart => true, :reload => false + end +end + tools_packages = [] status_packages = {} @@ -408,7 +427,7 @@ if disks.count.positive? # an Areca controller as they only allow one thing to # talk to the controller at a time and smartd will # throw errors if it clashes with munin - disks = disks.reject { |disk| disk[:smart] && disk[:smart].start_with?("areca,") } + disks = disks.reject { |disk| disk[:smart]&.start_with?("areca,") } disks.each do |disk| munin_plugin "smart_#{disk[:munin]}" do