]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/resolv/templates/resolv.conf.erb
b16b145910cb509bdcc3fe90d5ad9674d6ed7b0a
[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.66.249", "217.198.242.225"]
21     searchpaths << "debprivate-darmstadt.debian.org"
22 end
23
24 searchpaths << "debian.org"
25
26 if nameservers.empty?
27   raise Puppet::ParseError, "Something has gone wrong writing resolv.conf: probably included for wrong hoster"
28 end
29
30 resolvconf += "search " + searchpaths.join(" ") + "\n"
31 nameservers.each do |ns|
32   resolvconf += "nameserver " + ns + "\n"
33 end
34
35 resolvconf
36 %>