X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fresolv%2Ftemplates%2Fresolv.conf.erb;h=2e1968b639785d625a38b1cd0e45ffbf58e5ad7d;hb=d6761ce0180c2b4ac9f90e744fa34416ee68ae48;hp=34ea6af0a955d6cc2e2175966fadccb9473f5015;hpb=466e17dc9866909aca0a4ccddb1c605be8135013;p=mirror%2Fdsa-puppet.git diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index 34ea6af0a..2e1968b63 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -6,19 +6,19 @@ <%= nameservers = [] searchpaths = [] -options = [] +options = [] +resolvconf = '' -if %w{draghi liszt}.include?(hostname) +if %w{draghi}.include?(hostname) nameservers << "127.0.0.1" end nameservers += scope.lookupvar('ns') -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" -searchpaths += scope.lookupvar('sp') -resolvconf = '' resolvconf += "search " + searchpaths.to_a.flatten.join(" ") + "\n" if has_variable?('unbound') and unbound and unbound == "true" @@ -36,7 +36,7 @@ else end end -options.each do |opt| +options.to_a.flatten.each do |opt| resolvconf += "options " + opt + "\n" end