X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=e7ecf53629d0f909d95c6617fe3d171b25952145;hb=5fb5c09979326da2175dcf95179eaaf517a3eb46;hp=ad7ac72381c2f8fdcde9894da4cc0fc5b75592e9;hpb=5c1575180e9333ccb1af1f0331f540811e8b774b;p=dsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index ad7ac723..e7ecf536 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -21,11 +21,14 @@ searchpaths << "debian.org" resolvconf = '' resolvconf += "search " + searchpaths.join(" ") + "\n" -if unbound and unbound == "true" +if defined?(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|