X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fnodeinfo.rb;h=7698df30ed9df6ef1c0f13a10b20ab57f4ced2ed;hb=5402bb478eea848bcaf50b2ac8692e638d50b6af;hp=74dcd892bee630cf4a156a2fc2c569746266a548;hpb=222170d9353a0274b20d04d61028a794efb78d59;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 74dcd892..7698df30 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -13,13 +13,19 @@ module Puppet::Parser::Functions 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['buildd'] = nodeinfo['ldap']['purpose'].include?('buildd') + nodeinfo['buildd'] = (nodeinfo['ldap']['purpose'] && nodeinfo['ldap']['purpose'].include?('buildd')) + + if lookupvar('::mta') == 'exim4' + unless nodeinfo['heavy_exim'] + nodeinfo['smarthost'] = 'mailout.debian.org' + end + end nodeinfo['misc'] = {} fqdn = lookupvar('::fqdn') if fqdn and fqdn == host v4ips = lookupvar('::v4ips') - if v4ips + if v4ips and v4ips.to_s != "" and v4ips.to_s != 'undefined' nodeinfo['misc']['v4addrs'] = v4ips.split(',') # find out if we are behind nat @@ -28,7 +34,7 @@ module Puppet::Parser::Functions end v6ips = lookupvar('::v6ips') - if v6ips and v6ips != "" + if v6ips and v6ips.to_s != "" and v6ips.to_s != 'undefined' nodeinfo['misc']['v6addrs'] = v6ips.split(',') end end