]> git.openstreetmap.org Git - chef.git/commitdiff
Get hardware cookbook working on debian
authorTom Hughes <tom@compton.nu>
Thu, 23 Mar 2023 18:28:11 +0000 (18:28 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 23 Mar 2023 18:51:38 +0000 (18:51 +0000)
cookbooks/hardware/recipes/default.rb

index 2af1124797d24f002add58d0ba2a7419782bf31c..3272e91a1bfc5816874969137fde8e1b842967b3 100644 (file)
@@ -17,6 +17,7 @@
 # limitations under the License.
 #
 
+include_recipe "apt"
 include_recipe "git"
 include_recipe "munin"
 include_recipe "prometheus"
@@ -77,13 +78,13 @@ when "HP", "HPE"
   package "hp-health" do
     action :install
     notifies :restart, "service[hp-health]"
-    only_if { node[:lsb][:release].to_f < 22.04 }
+    only_if { platform?("ubuntu") && 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 }
+    only_if { platform?("ubuntu") && node[:lsb][:release].to_f < 22.04 }
   end
 
   if product.end_with?("Gen8", "Gen9")