X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=9ca7bd92c984168a532c48311d440b3ef653e72e;hb=39cbeb0d1b398f131910409f7ae7aa491bbba992;hp=0ebef6c5b81e678a826f09b9332339726219d12e;hpb=259ecf970241269d8237cdc9f73f323f8fcf78fa;p=dsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index 0ebef6c5..9ca7bd92 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -8,7 +8,7 @@ nameservers = [] searchpaths = [] options = [] -if %w{draghi liszt widor spohr}.include?(hostname) +if %w{draghi liszt bendel}.include?(hostname) nameservers << "127.0.0.1" end @@ -21,12 +21,14 @@ searchpaths << "debian.org" resolvconf = '' resolvconf += "search " + searchpaths.join(" ") + "\n" -unbound = lookupvar('unbound') -if unbound and unbound == "true" +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!" + #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|