]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ferm/templates/me.conf.erb
Try a new modules/ferm/templates/me.conf.erb
[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 restrict_ssh = %w{logtest01 geo1 geo2 geo3 bartok beethoven tchaikovsky schroeder}
8
9 ssh4allowed = []
10 ssh6allowed = []
11
12 if restrict_ssh.include?(hostname) then
13         ssh4allowed  << %w{$DSA_IPS $HOST_NAGIOS_V4 $HOST_DB_V4}
14         ssh6allowed << %w{$DSA_V6_IPS $HOST_NAGIOS_V6 $HOST_DB_V6}
15 end
16 if %w{schroeder}.include?(hostname) then
17         puts '@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 );'
18         ssh4allowed << '$CARNET'
19 end
20 if %w{bartok beethoven}.include?(hostname) then
21         ssh4allowed << '$HOST_DEBIAN_V4'
22         ssh6allowed << '$HOST_DEBIAN_V6'
23 end
24 ssh4allowed.length == 0 and ssh4allowed << '0.0.0.0/0'
25 ssh6allowed.length == 0 and ssh6allowed << '::'
26
27 puts "@def $SSH_SOURCES    = (#{ssh4allowed.join(' ')});";
28 puts "@def $SSH_V6_SOURCES = (#{ssh6allowed.join(' ')});";
29
30
31
32
33 smtp4allowed = []
34 smtp6allowed = []
35
36 if not nodeinfo['smarthost'].empty?
37   smtp4allowed << %w{$HOST_MAILRELAY_V4 $HOST_NAGIOS_V4}
38   smtp6allowed << %w{$HOST_MAILRELAY_V6 $HOST_NAGIOS_V6}
39 end
40
41 smtp4allowed.length == 0 and smtp4allowed << '0.0.0.0/0'
42 smtp6allowed.length == 0 and smtp6allowed << '::'
43
44 puts "@def $SMTP_SOURCES    = (#{smtp4allowed.join(' ')});";
45 puts "@def $SMTP_V6_SOURCES = (#{smtp6allowed.join(' ')});";
46
47 %>