]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
hardware: do not fail if node[:hardware][:pci] is undefined (tests)
[chef.git] / cookbooks / hardware / recipes / default.rb
index d77aebacd248cf0710dca8b780fa99dbf431309c..4e676f3879712720e3ac7211c2e47ae6dd187b59 100644 (file)
@@ -227,7 +227,7 @@ else
 end
 
 watchdog_module = %w[hpwdt sp5100_tco].find do |module_name|
-  node[:hardware][:pci].any? { |_, pci| pci[:modules]&.any?(module_name) }
+  node[:hardware][:pci]&.any? { |_, pci| pci[:modules]&.any?(module_name) }
 end
 
 if node[:kernel][:modules].include?("ipmi_si")