Revert "We use "keyinfo" in all kinda of places. Rename it to something more generic"
authorPeter Palfrader <peter@palfrader.org>
Thu, 2 Sep 2010 15:05:37 +0000 (17:05 +0200)
committerPeter Palfrader <peter@palfrader.org>
Thu, 2 Sep 2010 15:05:37 +0000 (17:05 +0200)
This reverts commit d7475f90c56697e9589e1386ced135498df68c81.

manifests/site.pp
modules/exim/templates/manualroute.erb
modules/ferm/templates/defs.conf.erb
modules/munin-node/templates/munin-node.conf.erb
modules/nagios/templates/inc-debian.org.erb
modules/named/templates/named.conf.options.erb
modules/portforwarder/templates/authorized_keys.erb
modules/ssh/templates/authorized_keys.erb

index f040683..9b00836 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")
     $hoster    = whohosts($nodeinfo, "/etc/puppet/modules/debian-org/misc/hoster.yaml")
-    $ldapall   = allnodeinfo("sshRSAHostKey", "ipHostNumber", "mXRecord")
+    $keyinfo   = allnodeinfo("sshRSAHostKey", "ipHostNumber")
+    $mxinfo    = allnodeinfo("mXRecord")
     notice("hoster for ${fqdn} is ${hoster}")
 
     include munin-node
index 07ddf55..2b84b4e 100644 (file)
@@ -19,8 +19,8 @@ when 'spohr.debian.org', 'draghi.debian.org', 'merikanto.debian.org' then
 end
 
 mxregex = Regexp.new('^\d+\s+(.*)\.$')
-ldapall.keys.sort.each do |host|
-  ldapall[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
index a684209..c39b03d 100644 (file)
@@ -19,7 +19,7 @@
   mailrelay = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['mailrelay']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /:/
              mailrelay << ip
           end
@@ -33,7 +33,7 @@
   mailrelay = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['mailrelay']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /\./
              mailrelay << ip
           end
@@ -49,7 +49,7 @@
   nagii = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['nagiosmaster'] or localinfo[node]['extranrpeclient']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /:/
              nagii << ip
           end
@@ -63,7 +63,7 @@
   nagii = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['nagiosmaster'] or localinfo[node]['extranrpeclient']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /\./
              nagii << ip
           end
@@ -79,7 +79,7 @@
   munins = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['muninmaster']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /:/
              munins << ip
           end
@@ -93,7 +93,7 @@
   munins = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['muninmaster']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /\./
              munins << ip
           end
   dbs = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['dbmaster']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /\./
              dbs << ip
           end
   dbs = []
   localinfo.keys.sort.each do |node|
       if localinfo[node]['dbmaster']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
              next if ip =~ /:/
              dbs << ip
           end
 
 @def $HOST_DEBIAN_V4 = (<%=
   dbs = []
-  ldapall.keys.sort.each do |node|
-      next unless ldapall[node].has_key?('ipHostNumber')
-      ldapall[node]['ipHostNumber'].each do |ip|
+  keyinfo.keys.sort.each do |node|
+      next unless keyinfo[node].has_key?('ipHostNumber')
+      keyinfo[node]['ipHostNumber'].each do |ip|
          next if ip =~ /:/
          dbs << ip
       end
 
 @def $HOST_DEBIAN_V6  = (<%=
   dbs = []
-  ldapall.keys.sort.each do |node|
-      next unless ldapall[node].has_key?('ipHostNumber')
-      ldapall[node]['ipHostNumber'].each do |ip|
+  keyinfo.keys.sort.each do |node|
+      next unless keyinfo[node].has_key?('ipHostNumber')
+      keyinfo[node]['ipHostNumber'].each do |ip|
          next if ip =~ /\./
          dbs << ip
       end
index 73eab95..231b1a2 100644 (file)
@@ -42,7 +42,7 @@ ignore_file \.rpm(save|new)$
 str = ''
 localinfo.keys.sort.each do |node|
    if localinfo[node]['muninmaster']
-      ldapall[node]['ipHostNumber'].each do |ip|
+      keyinfo[node]['ipHostNumber'].each do |ip|
          str += "allow ^" + ip.split('.').join('\.') + "$\n"
       end
    end
index b3ce358..bf6c2f9 100644 (file)
@@ -7,7 +7,7 @@
 nagii = []
 localinfo.keys.sort.each do |node|
   if localinfo[node]['nagiosmaster'] or localinfo[node]['extranrpeclient']
-    nagii << ldapall[node]['ipHostNumber']
+    nagii << keyinfo[node]['ipHostNumber']
   end
 end
 
index 8d60278..84469df 100644 (file)
@@ -8,7 +8,7 @@ acl Nagios {
   str = ''
   localinfo.keys.sort.each do |node|
       if localinfo[node]['nagiosmaster']
-          ldapall[node]['ipHostNumber'].each do |ip|
+          keyinfo[node]['ipHostNumber'].each do |ip|
               str += "\t" + ip + "/32;\n"
           end
       end
index d119bf2..985f367 100644 (file)
@@ -29,7 +29,7 @@ config.each_pair do |sourcehost, services|
 
        if allowed_ports.length > 0
                sshkey = getportforwarderkey(sourcehost)
-               remote_ip = ldapall[sourcehost]['ipHostNumber'].join(',')
+               remote_ip = keyinfo[sourcehost]['ipHostNumber'].join(',')
                local_bind = '127.101.%d.%d'%[ (sourcehost.hash / 256 % 256), sourcehost.hash % 256 ]
 
                lines << "# from #{sourcehost}"
index 71b604c..ba6f9f6 100644 (file)
@@ -36,9 +36,9 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAuGJnElqbhgLtmJp/de8s42cAwKrkAhFq5u8EAkauEv6B
 <%= machine_keys = case fqdn
    when "bartok.debian.org", "beethoven.debian.org" then
      out = ''
-     ldapall.keys.sort.each do |node|
-       out += '# ' + ldapall[node]['hostname'].to_s + '
-command="/usr/lib/da-backup/da-backup-ssh-wrap ' + ldapall[node]['hostname'].to_s + '",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from="' + keyinfo[node]['ipHostNumber'].join(',') + '" ' + keyinfo[node]['sshRSAHostKey'].to_s + '
+     keyinfo.keys.sort.each do |node|
+       out += '# ' + keyinfo[node]['hostname'].to_s + '
+command="/usr/lib/da-backup/da-backup-ssh-wrap ' + keyinfo[node]['hostname'].to_s + '",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from="' + keyinfo[node]['ipHostNumber'].join(',') + '" ' + keyinfo[node]['sshRSAHostKey'].to_s + '
 
 '
      end