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