projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try this
[mirror/dsa-puppet.git]
/
modules
/
resolv
/
templates
/
resolv.conf.erb
diff --git
a/modules/resolv/templates/resolv.conf.erb
b/modules/resolv/templates/resolv.conf.erb
index
2ca7073
..
a5291bf
100644
(file)
--- a/
modules/resolv/templates/resolv.conf.erb
+++ b/
modules/resolv/templates/resolv.conf.erb
@@
-6,20
+6,20
@@
<%=
nameservers = []
searchpaths = []
<%=
nameservers = []
searchpaths = []
-options = []
+options = []
+resolvconf = ''
if %w{draghi liszt}.include?(hostname)
nameservers << "127.0.0.1"
end
nameservers += scope.lookupvar('ns')
if %w{draghi liszt}.include?(hostname)
nameservers << "127.0.0.1"
end
nameservers += scope.lookupvar('ns')
-searchpaths += scope.lookupvar('s
ite::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('s
p')
+options
+= scope.lookupvar('opts')
searchpaths << "debian.org"
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"
if has_variable?('unbound') and unbound and unbound == "true"
resolvconf += "nameserver 127.0.0.1\n"
@@
-36,7
+36,7
@@
else
end
end
end
end
-options.each do |opt|
+options.
to_a.flatten.
each do |opt|
resolvconf += "options " + opt + "\n"
end
resolvconf += "options " + opt + "\n"
end