## ### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ### <%= nameservers = [] searchpaths = [] options = [] if %w{draghi liszt}.include?(hostname) nameservers << "127.0.0.1" end nameservers += nodeinfo['hoster']['nameservers'] if nodeinfo['hoster']['nameservers'] searchpaths += nodeinfo['hoster']['searchpaths'] if nodeinfo['hoster']['searchpaths'] options += nodeinfo['hoster']['resolvoptions'] if nodeinfo['hoster']['resolvoptions'] searchpaths << "debian.org" resolvconf = '' resolvconf += "search " + searchpaths.join(" ") + "\n" if has_variable?('unbound') and unbound and unbound == "true" resolvconf += "nameserver 127.0.0.1\n" else if nameservers.empty? #raise Puppet::ParseError, "Something has gone wrong writing resolv.conf. No nameservers to use!" scope.function_warning(["Something has gone wrong writing resolv.conf. No nameservers to use - using google's!"]) nameservers << '8.8.8.8' nameservers << '8.8.4.4' end nameservers.each do |ns| resolvconf += "nameserver " + ns + "\n" end end options.each do |opt| resolvconf += "options " + opt + "\n" end resolvconf %>