X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fnodeinfo.rb;h=cf8ea9dca011bdc4a996c6b53b911924ec9567ee;hb=a97bb246b7122f4bb7686b9b48ee379e00bf4914;hp=7a02be462ec2d4b62d1d0416b99add756cfc5a32;hpb=fcf8c592a5bfdd886af67d15bc832db4c45e4c71;p=dsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb index 7a02be46..cf8ea9dc 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -7,13 +7,15 @@ module Puppet::Parser::Functions require '/var/lib/puppet/lib/puppet/parser/functions/ldapinfo.rb' require '/var/lib/puppet/lib/puppet/parser/functions/whohosts.rb' - nodeinfo = function_yamlinfo(host, yamlfile) - nodeinfo['ldap'] = function_ldapinfo(host, '*') + nodeinfo = function_yamlinfo([host, yamlfile]) + nodeinfo['ldap'] = function_ldapinfo([host, '*']) unless nodeinfo['ldap']['ipHostNumber'] raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap" end - nodeinfo['hoster'] = function_whohosts(nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml") + nodeinfo['hoster'] = function_whohosts([nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml"]) nodeinfo['buildd'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('buildd')) + nodeinfo['timeserver'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('timeserver')) + nodeinfo['porterbox'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('porterbox')) if lookupvar('::mta') == 'exim4' unless nodeinfo['heavy_exim'] @@ -39,8 +41,8 @@ module Puppet::Parser::Functions end end - ns = function_hiera('nameservers') - allow_dns_q = function_hiera('allow_dns_query') + ns = function_hiera(['nameservers']) + allow_dns_q = function_hiera(['allow_dns_query']) if ns.empty? # no nameservers known for this hoster nodeinfo['misc']['resolver-recursive'] = true