From 4e11e90227be8236cc50c90cb98c602d0fa8a61b Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 5 Oct 2026 12:04:01 +0100 Subject: [PATCH] hardware: Set basic iLO networking defaults --- cookbooks/hardware/recipes/default.rb | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index ee1d0834c..e19a7e9ad 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -64,21 +64,35 @@ case manufacturer when "HP", "HPE" include_recipe "apt::management-component-pack" - unless node[:lsb][:release] == "trixie" - package "hponcfg" + package "hponcfg" - execute "update-ilo" do + execute "update-ilo" do + action :nothing + command "/usr/sbin/hponcfg -f /etc/ilo-defaults.xml" + not_if { kitchen? } + end + + template "/etc/ilo-defaults.xml" do + source "ilo-defaults.xml.erb" + owner "root" + group "root" + mode "644" + notifies :run, "execute[update-ilo]" + end + + unless product.end_with?("G6", "G7") # iLO4+ Only + execute "update-ilo-network" do action :nothing - command "/usr/sbin/hponcfg -f /etc/ilo-defaults.xml" + command "/usr/sbin/hponcfg -f /etc/ilo-network.xml" not_if { kitchen? } end - template "/etc/ilo-defaults.xml" do - source "ilo-defaults.xml.erb" + template "/etc/ilo-network.xml" do + source "ilo-network.xml.erb" owner "root" group "root" mode "644" - notifies :run, "execute[update-ilo]" + notifies :run, "execute[update-ilo-network]" end end -- 2.47.3