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