]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ferm/templates/me.conf.erb
add heininen
[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{logtest01 geo1 geo2 geo3 bartok beethoven tchaikovsky schroeder heininen}
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{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         ssh4allowed << '$CARNET'
21         ssh4allowed << '82.195.75.84' # nott.ayous.org, HE (builddadm)
22 end
23 if %w{bartok beethoven}.include?(hostname) then
24         ssh4allowed << '$HOST_DEBIAN_V4'
25         ssh6allowed << '$HOST_DEBIAN_V6'
26 end
27 ssh4allowed.length == 0 and ssh4allowed << '0.0.0.0/0'
28 ssh6allowed.length == 0 and ssh6allowed << '::/0'
29
30 out << "@def $SSH_SOURCES    = (#{ssh4allowed.join(' ')});"
31 out << "@def $SSH_V6_SOURCES = (#{ssh6allowed.join(' ')});"
32
33
34
35
36 smtp4allowed = []
37 smtp6allowed = []
38
39 if not nodeinfo['smarthost'].empty?
40   smtp4allowed << %w{$HOST_MAILRELAY_V4 $HOST_NAGIOS_V4}
41   smtp6allowed << %w{$HOST_MAILRELAY_V6 $HOST_NAGIOS_V6}
42 end
43
44 smtp4allowed.length == 0 and smtp4allowed << '0.0.0.0/0'
45 smtp6allowed.length == 0 and smtp6allowed << '::'
46
47 out << "@def $SMTP_SOURCES    = (#{smtp4allowed.join(' ')});"
48 out << "@def $SMTP_V6_SOURCES = (#{smtp6allowed.join(' ')});"
49
50 out.join("\n")
51 %>