def install(role, filter_recipes = nil)
      files = [
        environment_file(environment),
        secret_environment_file(environment),
        role_file(role),
        secret_role_file(role),
        node_file,
        secret_node_file,
      ].compact.select {|f| File.readable?(f) }

      property = HashExt.new.deep_merge!({
        'environment' => environment,
        'role'        => role,
        'roles'       => roles,
        'hostinfo'    => hostinfo,
      })
      files.each do |file|
        property.deep_merge!(get_content(file))
      end
      property['attributes'] ||= {}

      # filter out the recipe
      if filter_recipes and !filter_recipes.empty?
        property['attributes'].keys.each do |key|
          property['attributes'].delete(key) unless filter_recipes.include?(key)
        end
      end

      if property['attributes'].empty?
        PropertyFile.new(nil, files)
      else
        fp = Tempfile.create("kondate_")
        YAML.dump(property.to_h, fp)
        fp.close
        PropertyFile.new(fp.path, files)
      end
    end
def install(role, filter_recipes = nil)
      files = [
        environment_file(environment),
        secret_environment_file(environment),
        role_file(role),
        secret_role_file(role),
        node_file,
        secret_node_file,
      ].compact.select {|f| File.readable?(f) }

      property = HashExt.new.deep_merge!({
        'environment' => environment,
        'role'        => role,
        'roles'       => roles,
        'hostinfo'    => hostinfo,
      })
      files.each do |file|
        property.deep_merge!(get_content(file))
      end
      property['attributes'] ||= {}

      # filter out the recipe
      if filter_recipes and !filter_recipes.empty?
        property['attributes'].keys.each do |key|
          property['attributes'].delete(key) unless filter_recipes.include?(key)
        end
      end

      if property['attributes'].empty?
        PropertyFile.new(nil, files)
      else
        fp = Tempfile.create("kondate_")
        YAML.dump(property.to_h, fp)
        fp.close
        PropertyFile.new(fp.path, files)
      end
    end
Generate tmp node file (for each role)

   { environment: environment, role: role, roles: roles } +
   environment_file + secret_environment_file +
   role_file + secret_role_file +
   node_file + node_secret_file

 This file is automatically created and removed