]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
hardware: Set OSM ilo defaults
[chef.git] / cookbooks / hardware / recipes / default.rb
index 751810a3e9faa5f63c98efafb6d6450230f7c8a0..952729a007cf9664e2ad0fa252b230860f77e197 100644 (file)
@@ -59,14 +59,29 @@ case manufacturer
 when "HP"
   package "hponcfg"
 
+  execute "update-ilo" do
+    action :nothing
+    command "/usr/sbin/hponcfg -f /etc/ilo-defaults.xml"
+  end
+
+  template "/etc/ilo-defaults.xml" do
+    source "ilo-defaults.xml.erb"
+    owner "root"
+    group "root"
+    mode "644"
+    notifies :run, "execute[update-ilo]"
+  end
+
   package "hp-health" do
     action :install
     notifies :restart, "service[hp-health]"
+    only_if { node[:lsb][:release].to_f < 22.04 }
   end
 
   service "hp-health" do
     action [:enable, :start]
     supports :status => true, :restart => true
+    only_if { node[:lsb][:release].to_f < 22.04 }
   end
 
   if product.end_with?("Gen8", "Gen9")