$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")
- $keyinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber", "purpose")
+ $allnodeinfo = allnodeinfo("sshRSAHostKey", "ipHostNumber", "purpose")
$mxinfo = allnodeinfo("mXRecord")
notice("hoster for ${fqdn} is ${hosterinfo}")
<%=
lines = []
- keyinfo.keys.sort.each do |node|
- if keyinfo[node]['purpose'].include?('buildd')
- lines << " # #{keyinfo[node]['hostname'].to_s}"
- keyinfo[node]['ipHostNumber'].each do |addr|
+ allnodeinfo.keys.sort.each do |node|
+ next unless allnodeinfo[node]['purpose']
+ if allnodeinfo[node]['purpose'].include?('buildd')
+ lines << " # #{allnodeinfo[node]['hostname'].to_s}"
+ allnodeinfo[node]['ipHostNumber'].each do |addr|
lines << " allow from #{addr}"
end
end
lines.join("\n")
# vim:set et:
+# vim:set tabwidth=2:
# vim:set sts=2 ts=2:
# vim:set shiftwidth=2:
%>
mailrelay = []
localinfo.keys.sort.each do |node|
if localinfo[node]['mailrelay']
- keyinfo[node]['ipHostNumber'].each do |ip|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo[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|
+ allnodeinfo.keys.sort.each do |node|
+ next unless allnodeinfo[node].has_key?('ipHostNumber')
+ allnodeinfo[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|
+ allnodeinfo.keys.sort.each do |node|
+ next unless allnodeinfo[node].has_key?('ipHostNumber')
+ allnodeinfo[node]['ipHostNumber'].each do |ip|
next if ip =~ /\./
dbs << ip
end