}
}
- case $hostname {
- spohr: {
+ case extractnodeinfo($nodeinfo, 'muninmaster') {
+ "true": {
include munin-node::master
}
}
- case $hostname {
- tchaikovsky: {
+
+ case extractnodeinfo($nodeinfo, 'nagiosmaster') {
+ "true": {
include nagios::server
}
default: {
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-@def &SERVICE($proto, $port) = {
- proto $proto mod state state (NEW) dport $port ACCEPT;
-}
-
-@def &SERVICE_RANGE($proto, $port, $srange) = {
- proto $proto mod state state (NEW) dport $port saddr ($srange) ACCEPT;
-}
-
-@def &TCP_UDP_SERVICE($port) = {
- proto (tcp udp) mod state state (NEW) dport $port ACCEPT;
-}
-
-@def $HOST_MUNIN = (192.25.206.33);
-@def $HOST_NAGIOS = (206.12.19.118);
-
-@def $sgran = (91.103.132.24/29);
-@def $weasel = ();
-@def $weasel = ($weasel 86.59.118.144/28); # debian@sil
-@def $weasel = ($weasel 86.59.21.32/29); # anguilla1
-@def $weasel = ($weasel 86.59.30.32/28); # anguilla2
-@def $weasel = ($weasel 141.201.27.0/24); # came
-@def $weasel = ($weasel 62.99.152.178); # argos.campus-sbg
-@def $zobel = ();
-@def $luca = ();
-@def $DSA_IPS = ($sgran $weasel $zobel $luca);
-
-@def $sgran6 = (2001:4b10:100b::/48);
-@def $weasel6 = ();
-@def $weasel6 = ($weasel6 2001:826:408:200::/56); # came
-@def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
-@def $zobel6 = ();
-@def $luca6 = ();
-@def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6);
mode => 0400,
notify => Exec["ferm restart"];
"/etc/ferm/conf.d/defs.conf":
- source => "puppet:///ferm/defs.conf",
+ content => template("ferm/defs.conf.erb"),
require => Package["ferm"],
mode => 0400,
notify => Exec["ferm restart"];
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+@def &SERVICE($proto, $port) = {
+ proto $proto mod state state (NEW) dport $port ACCEPT;
+}
+
+@def &SERVICE_RANGE($proto, $port, $srange) = {
+ proto $proto mod state state (NEW) dport $port saddr ($srange) ACCEPT;
+}
+
+@def &TCP_UDP_SERVICE($port) = {
+ proto (tcp udp) mod state state (NEW) dport $port ACCEPT;
+}
+
+@def $HOST_NAGIOS = (<%=
+ nagii = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['nagiosmaster'] == "true"
+ nagii << keyinfo[node][0]['ipHostNumber']
+ end
+ end
+
+ nagii.join(' ')
+%>);
+
+@def $HOST_MUNIN = (<%=
+ munins = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['muninmaster'] == "true"
+ munins << keyinfo[node][0]['ipHostNumber']
+ end
+ end
+
+ munins.join(' ')
+%>);
+
+@def $sgran = (91.103.132.24/29);
+@def $weasel = ();
+@def $weasel = ($weasel 86.59.118.144/28); # debian@sil
+@def $weasel = ($weasel 86.59.21.32/29); # anguilla1
+@def $weasel = ($weasel 86.59.30.32/28); # anguilla2
+@def $weasel = ($weasel 141.201.27.0/24); # came
+@def $weasel = ($weasel 62.99.152.178); # argos.campus-sbg
+@def $zobel = ();
+@def $luca = ();
+@def $DSA_IPS = ($sgran $weasel $zobel $luca);
+
+@def $sgran6 = (2001:4b10:100b::/48);
+@def $weasel6 = ();
+@def $weasel6 = ($weasel6 2001:826:408:200::/56); # came
+@def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
+@def $zobel6 = ();
+@def $luca6 = ();
+@def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6);
##
<%=
-nagii = [ '206.12.19.118', '192.25.206.33', '82.195.75.106' ]
+ournag = []
+localinfo.keys.sort.each do |node|
+ if localinfo[node]['nagiosmaster'] == "true"
+ ournag << keyinfo[node][0]['ipHostNumber']
+ end
+end
+
+nagii = ournag
case fqdn when
'mundy.debian.org', 'penalosa.debian.org', 'caballero.debian.org', 'peri.debian.org' then
file=/etc/nagios/obsolete-packages-ignore.d
file=/etc/bind/geodns
<%= extradir=""
-case fqdn
-when "tchaikovsky.debian.org": extradir="file=/etc/nagios3/puppetconf.d
+if nodeinfo['nagiosmaster']
+ extradir="file=/etc/nagios3/puppetconf.d
file=/etc/puppet"
-else extradir="file=/etc/puppet"
end
extradir
%>
+file=/etc/puppet
file=/etc/cron.d
file=/usr/lib/nagios/plugins
file=/usr/sbin