summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-18 14:00:33 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-18 14:00:33 +0000
commitaba3d6522f83f86c4d04c864becee4e2bc31d95c (patch)
treefcf0a3a3727e280d5e76f6a6ca4c19d2d0686ef0 /lib/puppet
parent01c880869215288a269b1f607a7c3b4707a47abf (diff)
downloadpuppet-aba3d6522f83f86c4d04c864becee4e2bc31d95c.tar.gz
puppet-aba3d6522f83f86c4d04c864becee4e2bc31d95c.tar.xz
puppet-aba3d6522f83f86c4d04c864becee4e2bc31d95c.zip
Fixing bug in scope/interpreter where nodes found in ldap must have parent nodes. The problem was that the the scope was using the presence of a parent node to determine whether a node was found. Instead I added a flag in the arguments to "Scope#evaluate" to mark nodes as found.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1401 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/interpreter.rb4
-rw-r--r--lib/puppet/parser/scope.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index 7a595872e..012d7a82a 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -312,6 +312,10 @@ module Puppet
args[:classes] += nodeclasses if nodeclasses
args[:parentnode] = parent if parent
+
+ if nodeclasses or parent
+ args[:searched] = true
+ end
end
begin
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 317776055..8d5937217 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -349,7 +349,7 @@ module Puppet::Parser
# If they've provided a name or a parent, we assume they're looking
# for nodes.
- if hash.include? :parentnode
+ if hash[:searched]
# Specifying a parent node takes precedence, because it is assumed
# that this node was found in a remote repository like ldap.
gennode(hash)