]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Rework apt repository configuration
[chef.git] / cookbooks / hardware / recipes / default.rb
index 23e0d2105fe0722eb21339e5f25db22409ebac5c..96d3bb9373600e7a0aa4b79e4d1df47158cb717c 100644 (file)
@@ -17,7 +17,6 @@
 # limitations under the License.
 #
 
-include_recipe "apt"
 include_recipe "git"
 include_recipe "munin"
 include_recipe "prometheus"
@@ -57,6 +56,8 @@ end
 
 case manufacturer
 when "HP"
+  include_recipe "apt::management-component-pack"
+
   package "hponcfg"
 
   execute "update-ilo" do
@@ -225,18 +226,17 @@ ohai_plugin "lldp" do
   template "lldp.rb.erb"
 end
 
-%w[bus cache dimm iomca page socket-memory unknown].each do |trigger|
-  file "/etc/mcelog/#{trigger}-error-trigger.local" do
-    action :delete
-  end
-end
+package %w[
+  rasdaemon
+  ruby-sqlite3
+]
 
-service "mcelog" do
-  action [:stop, :disable]
+service "rasdaemon" do
+  action [:enable, :start]
 end
 
-package "mcelog" do
-  action :purge
+prometheus_exporter "rasdaemon" do
+  port 9797
 end
 
 tools_packages = []
@@ -313,6 +313,8 @@ else
   end
 end
 
+include_recipe "apt::hwraid" unless status_packages.empty?
+
 if status_packages.include?("cciss-vol-status")
   template "/usr/local/bin/cciss-vol-statusd" do
     source "cciss-vol-statusd.erb"
@@ -325,6 +327,7 @@ if status_packages.include?("cciss-vol-status")
   systemd_service "cciss-vol-statusd" do
     description "Check cciss_vol_status values in the background"
     exec_start "/usr/local/bin/cciss-vol-statusd"
+    nice 10
     private_tmp true
     protect_system "full"
     protect_home true