From 5cf68a9306f8b5cc9373a3d8f07d66c454ddf9c6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 23 Mar 2023 18:28:11 +0000 Subject: [PATCH] Get hardware cookbook working on debian --- cookbooks/hardware/recipes/default.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 2af112479..3272e91a1 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -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") -- 2.39.5