lib/puppet/resource/catalog.rb
# Create a new resource and register it in the catalog.
Create a new resource and register it in the catalog.
Create a new resource and register it in the catalog .
def create_resource(type, options)
    unless klass = Puppet::Type.type(type)
      raise ArgumentError, _("Unknown resource type %{type}") % { type: type }
    end
    return unless resource = klass.new(options)
    add_resource(resource)
    resource
  end
def create_resource ( type , options ) unless klass = Puppet :: Type . type ( type ) raise ArgumentError , _ ( "Unknown resource type %{type}" ) % { type : type } end return unless resource = klass . new ( options ) add_resource ( resource ) resource end
Create a new resource and register it in the catalog.
Create a new resource and register it in the catalog .
type
options