diff options
Diffstat (limited to 'lib/puppet/parser/ast/resource.rb')
-rw-r--r-- | lib/puppet/parser/ast/resource.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast/resource.rb b/lib/puppet/parser/ast/resource.rb index 6909c85c2..b019e6aac 100644 --- a/lib/puppet/parser/ast/resource.rb +++ b/lib/puppet/parser/ast/resource.rb @@ -49,10 +49,11 @@ class Resource < AST::ResourceReference :strict => true ) - # And then store the resource in the compiler. - # At some point, we need to switch all of this to return - # resources instead of storing them like this. + if resource.resource_type.is_a? Puppet::Resource::Type + resource.resource_type.instantiate_resource(scope, resource) + end scope.compiler.add_resource(scope, resource) + scope.compiler.evaluate_classes([resource_title],scope,false) if fully_qualified_type == 'class' resource end }.reject { |resource| resource.nil? } |