Signed-off-by: Stephen Gran <steve@lobefin.net>
class resolv {
+ $ns = hiera('nameservers')
+
file { '/etc/resolv.conf':
content => template('resolv/resolv.conf.erb');
}
nameservers << "127.0.0.1"
end
-nameservers += scope.lookupvar('site::nodeinfo')['hoster']['nameservers'] if scope.lookupvar('site::nodeinfo')['hoster']['nameservers']
+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']
nameservers << '8.8.4.4'
end
- nameservers.each do |ns|
+ nameservers.to_a.flatten.each do |ns|
resolvconf += "nameserver " + ns + "\n"
end
end