]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/resolv/templates/resolv.conf.erb
Revert "broken nameserver"
[dsa-puppet.git] / modules / resolv / templates / resolv.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 nameservers = []
8 searchpaths = []
9 resolvconf  = ''
10
11 case hoster
12   when "ubcece" then
13     searchpaths << "debprivate-ubc.debian.org"
14     nameservers += ["206.12.19.5", "137.82.1.1", "142.103.1.1" ]
15   when "darmstadt" then
16     case hostname
17       when "draghi", "liszt" then
18         nameservers << "127.0.0.1"
19     end
20     nameservers += ["82.195.75.81", "82.195.66.249", "217.198.242.225"]
21     searchpaths << "debprivate-darmstadt.debian.org"
22   when "ftcollins" then
23     case hostname
24       when "spohr", "samosa" then
25         nameservers << "127.0.0.1"
26     end
27     nameservers += ["192.25.206.33", "192.25.206.57"]
28     searchpaths << "debprivate-ftcollins.debian.org"
29 end
30
31 searchpaths << "debian.org"
32
33 if nameservers.empty?
34   raise Puppet::ParseError, "Something has gone wrong writing resolv.conf: probably included for wrong hoster"
35 end
36
37 resolvconf += "search " + searchpaths.join(" ") + "\n"
38 nameservers.each do |ns|
39   resolvconf += "nameserver " + ns + "\n"
40 end
41
42 resolvconf
43 %>