attempt to work around puppets crazy scoping
authorStephen Gran <steve@lobefin.net>
Sun, 15 Nov 2009 12:50:20 +0000 (12:50 +0000)
committerStephen Gran <steve@lobefin.net>
Sun, 15 Nov 2009 12:50:20 +0000 (12:50 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb
files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb
manifests/site.pp

index 6120c1f..47450d5 100644 (file)
@@ -1,6 +1,5 @@
 module Puppet::Parser::Functions
   newfunction(:allnodeinfo, :type => :rvalue) do |attributes|
-    require '/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb'
     attributes.unshift('*')
     return (function_ldapinfo(attributes))
   end
index fae9d6d..4d915b2 100644 (file)
@@ -5,7 +5,6 @@ module Puppet::Parser::Functions
     yamlfile = args[1]
 
     require '/etc/puppet/lib/puppet/parser/functions/ldapinfo.rb'
-    require '/etc/puppet/lib/puppet/parser/functions/yamlinfo.rb'
 
     results         = function_yamlinfo(host, yamlfile)
     results['ldap'] = function_ldapinfo(host, '*')
index ac27234..d5b6ab6 100644 (file)
@@ -14,11 +14,11 @@ Exec {
 }
 
 node default {
+    $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml")
     $nodeinfo  = nodeinfo($fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml")
     $hoster    = whohosts($nodeinfo, "/etc/puppet/modules/debian-org/misc/hoster.yaml")
     notice("hoster for ${fqdn} is ${hoster}")
 
-    $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml")
     $mxinfo   = allnodeinfo("mXRecord")
 
     include munin-node