]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ferm/templates/me.conf.erb
add master to carnet hosts
[dsa-puppet.git] / modules / ferm / templates / me.conf.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 <%=
7 out = []
8
9 restrict_ssh = %w{lebrun logtest01 geo1 geo2 geo3 bartok beethoven tchaikovsky schroeder heininen handel}
10
11 ssh4allowed = []
12 ssh6allowed = []
13
14 if restrict_ssh.include?(hostname) then
15         ssh4allowed  << %w{$DSA_IPS $HOST_NAGIOS_V4 $HOST_DB_V4}
16         ssh6allowed << %w{$DSA_V6_IPS $HOST_NAGIOS_V6 $HOST_DB_V6}
17 end
18 if %w{lebrun schroeder}.include?(hostname) then
19         out << '@def $CARNET = ( 193.198.184.8/29 161.53.160.133 161.53.160.90 161.53.11.222 161.53.12.134 161.53.12.142 161.53.12.143 );'
20         out << '@def $KIBI = ( 88.164.242.219 );'
21         ssh4allowed << '$CARNET'
22         ssh4allowed << '$KIBI'
23         ssh4allowed << '70.103.162.29' # master
24         ssh4allowed << '82.195.75.84'  # nott.ayous.org, HE (builddadm)
25 end
26 if %w{bartok beethoven}.include?(hostname) then
27         ssh4allowed << '$HOST_DEBIAN_V4'
28         ssh6allowed << '$HOST_DEBIAN_V6'
29 end
30 ssh4allowed.length == 0 and ssh4allowed << '0.0.0.0/0'
31 ssh6allowed.length == 0 and ssh6allowed << '::/0'
32
33 out << "@def $SSH_SOURCES    = (#{ssh4allowed.join(' ')});"
34 out << "@def $SSH_V6_SOURCES = (#{ssh6allowed.join(' ')});"
35
36
37
38
39 smtp4allowed = []
40 smtp6allowed = []
41
42 if not nodeinfo['smarthost'].empty?
43   smtp4allowed << %w{$HOST_MAILRELAY_V4 $HOST_NAGIOS_V4}
44   smtp6allowed << %w{$HOST_MAILRELAY_V6 $HOST_NAGIOS_V6}
45 end
46
47 smtp4allowed.length == 0 and smtp4allowed << '0.0.0.0/0'
48 smtp6allowed.length == 0 and smtp6allowed << '::'
49
50 out << "@def $SMTP_SOURCES    = (#{smtp4allowed.join(' ')});"
51 out << "@def $SMTP_V6_SOURCES = (#{smtp6allowed.join(' ')});"
52
53 out.join("\n")
54 %>