X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8df838bf09d95282ba29ddde8b504e0affc5f06e..03b7d5e985a34d01dccfd03dc11488015e97f7df:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 41eae5a5b..154a793a5 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -200,20 +200,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 = []