]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/resolv/templates/resolv.conf.erb
variable assignment does not clone string...
[dsa-puppet.git] / modules / resolv / templates / resolv.conf.erb
1 ##
2 ### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ###
5
6 <%
7 searchpaths = []
8 searchpaths += @sp
9 searchpaths << "debian.org" -%>
10 search <%= searchpaths.to_a.flatten.join(" ") %>
11 <%
12 nameservers = []
13 if %w{draghi}.include?(hostname)
14   nameservers << "127.0.0.1"
15 end
16 nameservers += @ns
17
18 if @unbound && @unbound == "true"
19   nameservers = ['127.0.0.1']
20 end
21
22 if nameservers.empty?
23   #raise Puppet::ParseError, "Something has gone wrong writing resolv.conf.  No nameservers to use!"
24   scope.function_warning(["Something has gone wrong writing resolv.conf.  No nameservers to use - using google's!"])
25   nameservers << '8.8.8.8'
26   nameservers << '8.8.4.4'
27 end
28
29 nameservers.to_a.flatten.each do |nms| -%>
30 nameserver <%= nms %>
31 <% end -%>
32 <%
33 options  = []
34 options += @opts -%>
35 <% options.to_a.flatten.each do |opt| -%>
36 options <%= opt %>
37 <% end -%>