]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ferm/templates/defs.conf.erb
8a6ece1ed3c7c45918c395399305a484e6f4fda8
[dsa-puppet.git] / modules / ferm / templates / defs.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 @def &SERVICE($proto, $port) = {
7  proto $proto mod state state (NEW) dport $port ACCEPT;
8 }
9
10 @def &SERVICE_RANGE($proto, $port, $srange) = {
11  proto $proto mod state state (NEW) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }"
12 }
13
14 @def &TCP_UDP_SERVICE($port) = {
15  proto (tcp udp) dport $port ACCEPT;
16 }
17
18 @def &TCP_UDP_SERVICE_RANGE($port, $srange) = {
19  proto (tcp udp) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }"
20 }
21
22 <%
23   rolehost={}
24   localinfo = scope.lookupvar('site::localinfo')
25   allnodeinfo = scope.lookupvar('site::allnodeinfo')
26
27   %w{mailrelay nagiosmaster extranrpeclient muninmaster dbmaster static_mirror static_source static_master}.each do |role|
28     rolehost[role] = []
29     localinfo.keys.sort.each do |node|
30       if localinfo[node][role]
31         rolehost[role] << allnodeinfo[node]['ipHostNumber']
32       end
33     end
34     rolehost[role].flatten!
35   end
36
37   dbs = []
38   allnodeinfo.keys.sort.each do |node|
39       next unless allnodeinfo[node].has_key?('ipHostNumber')
40       dbs << allnodeinfo[node]['ipHostNumber']
41   end
42   dbs.flatten!
43 %>
44
45 @def $HOST_MAILRELAY_V4 = (<%= scope.function_filter_ipv4([rolehost['mailrelay']]).uniq.join(' ') %>);
46 @def $HOST_MAILRELAY_V6 = (<%= scope.function_filter_ipv6([rolehost['mailrelay']]).uniq.join(' ') %>);
47 @def $HOST_MAILRELAY = ( $HOST_MAILRELAY_V4 $HOST_MAILRELAY_V6 );
48
49 @def $HOST_NAGIOS_V4 = (<%= scope.function_filter_ipv4([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
50 @def $HOST_NAGIOS_V6 = (<%= scope.function_filter_ipv6([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
51 @def $HOST_NAGIOS = ( $HOST_NAGIOS_V4 $HOST_NAGIOS_V6 );
52
53 @def $HOST_MUNIN_V4 = (<%= scope.function_filter_ipv4([rolehost['muninmaster']]).uniq.join(' ') %>);
54 @def $HOST_MUNIN_V6 = (<%= scope.function_filter_ipv6([rolehost['muninmaster']]).uniq.join(' ') %>);
55 @def $HOST_MUNIN = ( $HOST_MUNIN_V4 $HOST_MUNIN_V6 );
56
57 @def $HOST_DB_V4 = (<%= scope.function_filter_ipv4([rolehost['dbmaster']]).uniq.join(' ') %>);
58 @def $HOST_DB_V6 = (<%= scope.function_filter_ipv6([rolehost['dbmaster']]).uniq.join(' ') %>);
59 @def $HOST_DB = ( $HOST_DB_V4 $HOST_DB_V6 );
60
61 @def $HOST_STATICMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['static_master']]).uniq.join(' ') %>);
62 @def $HOST_STATICMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['static_master']]).uniq.join(' ') %>);
63 @def $HOST_STATIC_V4 = (<%= scope.function_filter_ipv4([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
64 @def $HOST_STATIC_V6 = (<%= scope.function_filter_ipv6([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
65
66 @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>);
67 @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>);
68 @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
69
70
71 @def $sgran   = (91.103.132.24/29 85.158.45.51/32);
72 @def $weasel  = ();
73 @def $weasel  = ($weasel 86.59.118.144/28); # debian@sil
74 @def $weasel  = ($weasel 86.59.21.32/29); # anguilla1
75 @def $weasel  = ($weasel 86.59.30.32/28); # anguilla2
76 @def $weasel  = ($weasel 141.201.0.0/16); # uni salzburg
77 @def $weasel  = ($weasel 62.99.152.176/28); # campus sbg
78 @def $zobel   = ();
79 @def $zobel   = ($zobel 87.139.82.80/32); # exit.credativ.com
80 @def $zobel   = ($zobel 87.193.134.192/27); # credativ qsc
81 @def $zobel   = ($zobel 78.47.2.104/29); # baldur, bragi, saga
82 @def $zobel   = ($zobel 92.198.42.24/29); # DG-i Office
83 @def $zobel   = ($zobel 93.94.128.0/21);  # DG-i AS
84 @def $zobel   = ($zobel 195.49.152.0/22); # DG-i AS
85 @def $zobel   = ($zobel 194.187.64.0/22); # DG-i AS
86 @def $luca    = (64.71.152.109);
87 @def $paravoid = (62.217.125.135); # scrooge.tty.gr
88 @def $tfheen   = ();
89 @def $tfheen   = ($tfheen 194.31.39.0/26); # office network
90 @def $tfheen   = ($tfheen 195.159.200.122); # home
91 @def $tfheen   = ($tfheen 77.40.254.120/29); # home
92 @def $master   = (82.195.75.110); # master.debian.org
93 @def $DSA_IPS = ($sgran $weasel $zobel $luca $paravoid $tfheen $master);
94
95 @def $sgran6     = (2001:4b10:100b::/48);
96 @def $sgran6     = ($sgran6 2001:4b10:0000:810b::/64);
97 @def $weasel6    = ();
98 @def $weasel6    = ($weasel6 2001:826:408::/48); # unisbg
99 @def $weasel6    = ($weasel6 2001:858:10f::/48); # anguilla
100 @def $zobel6     = ();
101 @def $zobel6     = ($zobel6 2001:6f8:1215::/48); # baldur
102 @def $zobel6     = ($zobel6 2001:6f8:928::/48); # WS2 
103 @def $zobel6     = ($zobel6 2a01:198:549::/48); # WGS20
104 @def $zobel6     = ($zobel6 2a01:198:6b2::/48); # AdS20
105 @def $zobel6     = ($zobel6 2a02:158::/32);     # DG-i AS
106 @def $luca6      = ();
107 @def $paravoid6  = (2001:648:2ffc:113:dcdb:eeff:fe5c:182b); # scrooge.tty.gr
108 @def $tfheen6    = ();
109 @def $tfheen6    = ($tfheen6 2a02:c0:1013:1::/64); # Office
110 @def $tfheen6    = ($tfheen6 2001:840:f000:4007::/64); # Home, link
111 @def $tfheen6    = ($tfheen6 2001:840:4007::/48); # Home
112 @def $master6     = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org
113 @def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6 $paravoid6 $tfheen6 $master6);
114
115 @def $USER_christoph = ();
116 #@def $USER_christoph = ($USER_christoph 212.114.250.148/31);
117 #@def $USER_christoph = ($USER_christoph 128.111.48.6/32); # U of Cal at Santa Barbara, until 2013-03
118 @def $USER_aurel32 = ();
119 @def $USER_aurel32 = ($USER_aurel32 88.191.126.93); # hall.aurel32.net
120 @def $USER_aurel32 = ($USER_aurel32 82.232.2.251); # farad.aurel32.net
121 @def $USER_joerg   = ();
122 @def $USER_joerg   = ($USER_joerg 213.146.108.160/29);
123 @def $USER_joerg   = ($USER_joerg 46.4.205.32);
124 @def $USER_joerg6  = ();
125 @def $USER_joerg6  = ($USER_joerg6 2a02:248:1005::/48);
126 @def $USER_joerg6  = ($USER_joerg6 2a01:4f8:131:1520::6667);
127
128 @def $BUILDD_SSH_ACCESS = ();
129 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 194.177.211.200); # grieg
130 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 5.153.231.18); # wuiet
131 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master
132 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 206.12.19.5); # ravel
133 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master
134 @def $FREEBSD_SSH_ACCESS = ();
135 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $DSA_IPS $BUILDD_SSH_ACCESS);
136 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $USER_christoph $USER_aurel32); # buildd admins
137 @def $UNGER_SSH_ACCESS = ();
138 @def $UNGER_SSH_ACCESS = ($UNGER_SSH_ACCESS $USER_joerg);
139 @def $UNGER_SSH6_ACCESS = ();
140 @def $UNGER_SSH6_ACCESS = ($UNGER_SSH6_ACCESS $USER_joerg6);