$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")
- $keyinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber")
- $mxinfo = allnodeinfo("mXRecord")
+ $ldapall = allnodeinfo("sshRSAHostKey", "ipHostNumber", "mXRecord")
notice("hoster for ${fqdn} is ${hoster}")
include munin-node
mailrelay = []
localinfo.keys.sort.each do |node|
if localinfo[node]['mailrelay']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /:/
mailrelay << ip
end
mailrelay = []
localinfo.keys.sort.each do |node|
if localinfo[node]['mailrelay']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[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']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[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']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /\./
nagii << ip
end
munins = []
localinfo.keys.sort.each do |node|
if localinfo[node]['muninmaster']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /:/
munins << ip
end
munins = []
localinfo.keys.sort.each do |node|
if localinfo[node]['muninmaster']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /\./
munins << ip
end
dbs = []
localinfo.keys.sort.each do |node|
if localinfo[node]['dbmaster']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /\./
dbs << ip
end
dbs = []
localinfo.keys.sort.each do |node|
if localinfo[node]['dbmaster']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /:/
dbs << ip
end
@def $HOST_DEBIAN_V4 = (<%=
dbs = []
- keyinfo.keys.sort.each do |node|
- next unless keyinfo[node].has_key?('ipHostNumber')
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall.keys.sort.each do |node|
+ next unless ldapall[node].has_key?('ipHostNumber')
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /:/
dbs << ip
end
@def $HOST_DEBIAN_V6 = (<%=
dbs = []
- keyinfo.keys.sort.each do |node|
- next unless keyinfo[node].has_key?('ipHostNumber')
- keyinfo[node]['ipHostNumber'].each do |ip|
+ ldapall.keys.sort.each do |node|
+ next unless ldapall[node].has_key?('ipHostNumber')
+ ldapall[node]['ipHostNumber'].each do |ip|
next if ip =~ /\./
dbs << ip
end
<%= machine_keys = case fqdn
when "bartok.debian.org", "beethoven.debian.org" then
out = ''
- 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 + '
+ 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 + '
'
end