diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-23 20:42:08 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-23 20:42:08 +0000 |
| commit | 8211df036e1d2d24e1084616fc3fc4891b06cfdd (patch) | |
| tree | 597f8b999cf5210a7ceff5ef1e1977f1de08c241 /lib/puppet/parser/interpreter.rb | |
| parent | d20ac8e0b564e5413d571f2059de559e0783b72d (diff) | |
| download | puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.tar.gz puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.tar.xz puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.zip | |
Many, many changes toward a completely functional system. The only current problems with my home config are that apache's stupid init script does not do status and that packages are not working as non-root users (which makes sense).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@703 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/interpreter.rb')
| -rw-r--r-- | lib/puppet/parser/interpreter.rb | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb index cd7ac46d6..e076bc1ca 100644 --- a/lib/puppet/parser/interpreter.rb +++ b/lib/puppet/parser/interpreter.rb @@ -45,15 +45,19 @@ module Puppet if @usenodes unless client raise Puppet::Error, - "Cannot evaluate no nodes with a nil client" + "Cannot evaluate nodes with a nil client" end # We've already evaluated the AST, in this case - @scope.evalnode(names, facts) + retval = @scope.evalnode(names, facts) + return retval else + # We've already evaluated the AST, in this case @scope = Puppet::Parser::Scope.new() # no parent scope @scope.interp = self - @scope.evaluate(@ast, facts) + @scope.type = "puppet" + @scope.name = "top" + return @scope.evaluate(@ast, facts) end #@ast.evaluate(@scope) rescue Puppet::DevError, Puppet::Error, Puppet::ParseError => except @@ -82,14 +86,14 @@ module Puppet # to pass to the client # this will be heirarchical, and will (at this point) contain # only TransObjects and TransSettings - @scope.name = "top" - @scope.type = "puppet" - begin - topbucket = @scope.to_trans - rescue => detail - Puppet.warning detail - raise - end + #@scope.name = "top" + #@scope.type = "puppet" + #begin + # topbucket = @scope.to_trans + #rescue => detail + # Puppet.warning detail + # raise + #end # add our settings to the front of the array # at least, for now @@ -104,7 +108,7 @@ module Puppet #retlist = TransObject.list #Puppet.debug "retobject length is %s" % retlist.length #TransObject.clear - return topbucket + #return topbucket end def scope @@ -120,6 +124,8 @@ module Puppet if @usenodes @scope = Puppet::Parser::Scope.new() # no parent scope + @scope.name = "top" + @scope.type = "puppet" @scope.interp = self Puppet.debug "Nodes defined" @ast.safeevaluate(@scope) |
