diff options
Diffstat (limited to 'lib/puppet/transportable.rb')
-rw-r--r-- | lib/puppet/transportable.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb index 0e3c3bb3a..75f40bd08 100644 --- a/lib/puppet/transportable.rb +++ b/lib/puppet/transportable.rb @@ -61,10 +61,17 @@ module Puppet def to_type(parent = nil) retobj = nil if type = Puppet::Type.type(self.type) - unless retobj = type.create(self) - #Puppet.notice "Could not create %s[%s]" % - # [self.type, self.name] - return nil + # FIXME This should really be done differently, but... + if retobj = type[self.name] + self.each do |param, val| + retobj[param] = val + end + else + unless retobj = type.create(self) + #Puppet.notice "Could not create %s[%s]" % + # [self.type, self.name] + return nil + end end #retobj.file = @file #retobj.line = @line |