From b961ac106252546fafa64ca3344d36a31b2e1bd8 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 15 Nov 2009 12:50:20 +0000 Subject: [PATCH] attempt to work around puppets crazy scoping Signed-off-by: Stephen Gran --- files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb | 1 - files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb | 1 - manifests/site.pp | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb b/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb index 6120c1f83..47450d559 100644 --- a/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb +++ b/files/etc/puppet/lib/puppet/parser/functions/allnodeinfo.rb @@ -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 diff --git a/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb b/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb index fae9d6dd7..4d915b21b 100644 --- a/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb +++ b/files/etc/puppet/lib/puppet/parser/functions/nodeinfo.rb @@ -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, '*') diff --git a/manifests/site.pp b/manifests/site.pp index ac2723458..d5b6ab6c8 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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 -- 2.20.1