+<%=
+nameservers = []
+searchpaths = []
+options = []
+
+if %w{draghi liszt widor spohr samosa}.include?(hostname)
+ nameservers << "127.0.0.1"
+end
+
+nameservers += hosterinfo['nameservers'] if hosterinfo['nameservers']
+searchpaths += hosterinfo['searchpaths'] if hosterinfo['searchpaths']
+options += hosterinfo['resolvoptions'] if hosterinfo['resolvoptions']
+
+searchpaths << "debian.org"
+
+if nameservers.empty?
+ raise Puppet::ParseError, "Something has gone wrong writing resolv.conf: probably included for wrong hoster"
+end
+
+resolvconf = ''
+resolvconf += "search " + searchpaths.join(" ") + "\n"
+nameservers.each do |ns|
+ resolvconf += "nameserver " + ns + "\n"