Method: Chef::Node#consume_attributes
- Defined in:
- lib/chef/node.rb
#consume_attributes(attrs) ⇒ Object
293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/chef/node.rb', line 293 def consume_attributes(attrs) attrs ||= {} Chef::Log.debug("Adding JSON Attributes") attrs.each do |key, value| if ["recipes", "run_list"].include?(key) append_recipes(value) else Chef::Log.debug("JSON Attribute: #{key} - #{value.inspect}") store(key, value) end end self[:tags] = Array.new unless attribute?(:tags) end |