def validate_node_file(name)
      # read in the file
      node = Chef::JSONCompat.from_json(IO.read("nodes/#{name}.json"))

      # check the node name vs. contents of the file
      return unless node["name"] != name

      STDERR.puts "ERROR: Node '#{name}' listed in the manifest does not match the name '#{node['name']}' within the nodes/#{name}.json file."
      exit(-1)
    end
def validate_node_file(name)
      # read in the file
      node = Chef::JSONCompat.from_json(IO.read("nodes/#{name}.json"))

      # check the node name vs. contents of the file
      return unless node["name"] != name

      STDERR.puts "ERROR: Node '#{name}' listed in the manifest does not match the name '#{node['name']}' within the nodes/#{name}.json file."
      exit(-1)
    end
validate individual node files