From: Tom Hughes Date: Wed, 24 Aug 2016 18:50:17 +0000 (+0100) Subject: Fix use of deprecated features X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/868dbb785525168c1d36f121bf83ebdd6c1aba51 Fix use of deprecated features --- diff --git a/cookbooks/hardware/attributes/default.rb b/cookbooks/hardware/attributes/default.rb index 81416582d..f77967a20 100644 --- a/cookbooks/hardware/attributes/default.rb +++ b/cookbooks/hardware/attributes/default.rb @@ -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 diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index de493ecff..0ed0841bf 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -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 diff --git a/cookbooks/ntp/attributes/default.rb b/cookbooks/ntp/attributes/default.rb index 66088fb2e..5d9d72439 100644 --- a/cookbooks/ntp/attributes/default.rb +++ b/cookbooks/ntp/attributes/default.rb @@ -1,4 +1,4 @@ -case platform +case node[:platform] when "ubuntu", "debian" default[:ntp][:service] = "ntp" when "redhat", "centos", "fedora"