]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/resolv/templates/resolv.conf.erb
same for searchpaths
[dsa-puppet.git] / modules / resolv / templates / resolv.conf.erb
index 2ca70739f6a8c2199e11ad24194bccbd5de85128..34ea6af0a955d6cc2e2175966fadccb9473f5015 100644 (file)
@@ -13,13 +13,13 @@ if %w{draghi liszt}.include?(hostname)
 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 << "debian.org"
+searchpaths += scope.lookupvar('sp')
 
 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"