X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=a5291bfad5d09d6da453940c4701491a10040625;hb=0a16104c67b3db4edef34356c7f31492d391a70b;hp=2ca70739f6a8c2199e11ad24194bccbd5de85128;hpb=d7fb8496f111e456de0a76540ffbb7b7a2be98b0;p=mirror%2Fdsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index 2ca70739f..a5291bfad 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -6,20 +6,20 @@ <%= nameservers = [] searchpaths = [] -options = [] +options = [] +resolvconf = '' if %w{draghi liszt}.include?(hostname) nameservers << "127.0.0.1" end nameservers += scope.lookupvar('ns') -searchpaths += scope.lookupvar('site::nodeinfo')['hoster']['searchpaths'] if scope.lookupvar('site::nodeinfo')['hoster']['searchpaths'] -options += scope.lookupvar('site::nodeinfo')['hoster']['resolvoptions'] if scope.lookupvar('site::nodeinfo')['hoster']['resolvoptions'] +searchpaths += scope.lookupvar('sp') +options += scope.lookupvar('opts') searchpaths << "debian.org" -resolvconf = '' -resolvconf += "search " + searchpaths.join(" ") + "\n" +resolvconf += "search " + searchpaths.to_a.flatten.join(" ") + "\n" if has_variable?('unbound') and unbound and unbound == "true" resolvconf += "nameserver 127.0.0.1\n" @@ -36,7 +36,7 @@ else end end -options.each do |opt| +options.to_a.flatten.each do |opt| resolvconf += "options " + opt + "\n" end