X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=531b516593fddf284f08eaac38d19fc31891fd34;hb=bec47f64dd4fc0b22b0ee6786caf788af66b69c6;hp=a36665fa665a6fa098170925db63b6ebeb3623b2;hpb=ae44d955fa429cbfbec37b612b7fa57a3ef6a784;p=dsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index a36665fa..531b5165 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}.include?(hostname) nameservers << "127.0.0.1" end @@ -21,12 +21,12 @@ searchpaths << "debian.org" resolvconf = '' resolvconf += "search " + searchpaths.join(" ") + "\n" -if defined?(unbound) and 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!" - #scope.function_warning("Something has gone wrong writing resolv.conf. No nameservers to use - using google's!") + 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