$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
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
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
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
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
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
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
<%= 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