]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Revert "and merge mxinfo into allnodeinfo"
authorPeter Palfrader <peter@palfrader.org>
Wed, 2 Mar 2011 11:33:16 +0000 (12:33 +0100)
committerPeter Palfrader <peter@palfrader.org>
Wed, 2 Mar 2011 11:33:16 +0000 (12:33 +0100)
This reverts commit d57f90694b908a8a5a326fea7597710104f9fb29.

Currently we would only fetch hosts that have all of the attributes in
question.

manifests/site.pp
modules/exim/templates/manualroute.erb

index 394cf8fa706f06e5dac0deda2c31f8fdf6e32713..5dfeef0a8e1d2be950b2009ed16b044d5141780f 100644 (file)
@@ -17,7 +17,8 @@ node default {
     $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml")
     $nodeinfo  = nodeinfo($fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml")
     $hosterinfo = whohosts($nodeinfo, "/etc/puppet/modules/debian-org/misc/hoster.yaml")
-    $allnodeinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber", "purpose", "mXRecord")
+    $allnodeinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber", "purpose")
+    $mxinfo    = allnodeinfo("mXRecord")
     notice("hoster for ${fqdn} is ${hosterinfo}")
 
     include munin-node
index 40062d8dccd1e7f218624c83c22df2552a870f57..ce22a342b867ca9adfa9a4e5021a94d3111889da 100644 (file)
@@ -18,9 +18,8 @@ if nodeinfo['mailrelay']
 end
 
 mxregex = Regexp.new('^\d+\s+(.*)\.$')
-allnodeinfo.keys.sort.each do |host|
-  next unless allnodeinfo[host]['mXRecord']
-  allnodeinfo[host]['mXRecord'].each do |mx|
+mxinfo.keys.sort.each do |host|
+  mxinfo[host]['mXRecord'].each do |mx|
     mxmatch = mxregex.match(mx)
     if mxmatches.include?(mxmatch[1])
       route = host + ":\t\t" + host