]> git.openstreetmap.org Git - chef.git/commitdiff
Fix use of deprecated features
authorTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 18:50:17 +0000 (19:50 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 18:50:17 +0000 (19:50 +0100)
cookbooks/hardware/attributes/default.rb
cookbooks/networking/recipes/default.rb
cookbooks/ntp/attributes/default.rb

index 81416582ddab885ae27ca6b9a64015880115fd9f..f77967a208604013e7ca5f50858f6a744748a23a 100644 (file)
@@ -8,11 +8,11 @@ default[:hardware][:grub][:cmdline] = %w(nomodeset)
 default[:hardware][:sensors] = {}
 
 if node[:dmi] && node[:dmi][:system]
-  case dmi.system.manufacturer
+  case node[:dmi][:system][:manufacturer]
   when "HP"
     default[:apt][:sources] |= ["management-component-pack"]
 
-    case dmi.system.product_name
+    case node[:dmi][:system][:product_name]
     when "ProLiant DL360 G6", "ProLiant DL360 G7"
       default[:hardware][:sensors][:"power_meter-*"][:power][:power1] = { :ignore => true }
     end
index de493ecffb4251acee5f7879d242e2f48b333124..0ed0841bfe0b1f5f81d1d0ab08db703bc8026123 100644 (file)
@@ -30,18 +30,18 @@ node[:networking][:interfaces].each do |name, interface|
 
   if interface[:role] && (role = node[:networking][:roles][interface[:role]])
     if role[interface[:family]]
-      node.set[:networking][:interfaces][name][:prefix] = role[interface[:family]][:prefix]
-      node.set[:networking][:interfaces][name][:gateway] = role[interface[:family]][:gateway]
+      node.normal[:networking][:interfaces][name][:prefix] = role[interface[:family]][:prefix]
+      node.normal[:networking][:interfaces][name][:gateway] = role[interface[:family]][:gateway]
     end
 
-    node.set[:networking][:interfaces][name][:metric] = role[:metric]
-    node.set[:networking][:interfaces][name][:zone] = role[:zone]
+    node.normal[:networking][:interfaces][name][:metric] = role[:metric]
+    node.normal[:networking][:interfaces][name][:zone] = role[:zone]
   end
 
   prefix = node[:networking][:interfaces][name][:prefix]
 
-  node.set[:networking][:interfaces][name][:netmask] = (~IPAddr.new(interface[:address]).mask(0)).mask(prefix)
-  node.set[:networking][:interfaces][name][:network] = IPAddr.new(interface[:address]).mask(prefix)
+  node.normal[:networking][:interfaces][name][:netmask] = (~IPAddr.new(interface[:address]).mask(0)).mask(prefix)
+  node.normal[:networking][:interfaces][name][:network] = IPAddr.new(interface[:address]).mask(prefix)
 end
 
 package network_packages
index 66088fb2e65a0a095660752c0f15729435259116..5d9d724398aab5fa5dd4c19cdefa5338b80b4dcd 100644 (file)
@@ -1,4 +1,4 @@
-case platform
+case node[:platform]
 when "ubuntu", "debian"
   default[:ntp][:service] = "ntp"
 when "redhat", "centos", "fedora"