chef/lib/chef/run_context.rb
# Used to load the node's recipes after expanding its run list
Used to load the node's recipes after expanding its run list
Used to load the node ' s recipes after expanding its run list
def load_attributes
      @events.attribute_load_start(count_files_by_segment(:attributes))
      foreach_cookbook_load_segment(:attributes) do |cookbook_name, filename|
        begin
          Chef::Log.debug("Node #{@node.name} loading cookbook #{cookbook_name}'s attribute file #{filename}")
          @node.from_file(filename)
        rescue Exception => e
          @events.attribute_file_load_failed(filename, e)
          raise
        end
      end
      @events.attribute_load_complete
    end
def load_attributes @events . attribute_load_start ( count_files_by_segment ( :attributes ) ) foreach_cookbook_load_segment ( :attributes ) do | cookbook_name , filename | begin Chef :: Log . debug ( "Node #{@node.name} loading cookbook #{cookbook_name}'s attribute file #{filename}" ) @node . from_file ( filename ) rescue Exception => e @events . attribute_file_load_failed ( filename , e ) raise end end @events . attribute_load_complete end
Used to load the node's recipes after expanding its run list
Used to load the node ' s recipes after expanding its run list