X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e5f294d3dc676675b2803915571c28337468c3b3..9b2abddf2004a1424175886a6e853304717cb0fe:/cookbooks/hardware/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 472db1817..d26667436 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -21,7 +21,7 @@ include_recipe "tools" include_recipe "munin" ohai_plugin "hardware" do - template_source "ohai.rb.erb" + template "ohai.rb.erb" end case node[:cpu][:"0"][:vendor_id] @@ -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,20 +201,22 @@ service "lldpd" do supports :status => true, :restart => true, :reload => true end -package "mcelog" +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 + %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 -end -service "mcelog" do - action [:start, :enable] - supports :status => true, :restart => true, :reload => false + service "mcelog" do + action [:start, :enable] + supports :status => true, :restart => true, :reload => false + end end tools_packages = []