+++ /dev/null
-default[:bind] = {}
version "1.0.0"
supports "ubuntu"
-depends "networking"
# limitations under the License.
#
-include_recipe "networking"
-
-clients = search(:node, "roles:#{node[:bind][:clients]}")
-
-ipv4_clients = clients.collect do |client|
- client.ipaddresses(:family => :inet)
-end.flatten
-
-ipv6_clients = clients.collect do |client|
- client.ipaddresses(:family => :inet6)
-end.flatten
-
package "bind9"
service "named" do
owner "root"
group "root"
mode "644"
- variables :ipv4_clients => ipv4_clients, :ipv6_clients => ipv6_clients
notifies :restart, "service[named]"
end
# DO NOT EDIT - This file is being maintained by Chef
-acl "osm" {
- 127.0.0.1/32;
-<% node.interfaces(:family => :inet).each do |interface| -%>
- <%= interface[:network] %>/<%= interface[:prefix] %>;
-<% end -%>
-<% @ipv4_clients.sort.each do |address| -%>
- <%= address %>/32;
-<% end -%>
-
- ::1/128;
-<% node.interfaces(:family => :inet6).each do |interface| -%>
- <%= interface[:network] %>/<%= interface[:prefix] %>;
-<% end -%>
-<% @ipv6_clients.sort.each do |address| -%>
- <%= address %>/128;
-<% end -%>
-};
-
options {
# Directory to use for any working files
directory "/var/cache/bind";
-<% if node[:bind][:forwarders] -%>
- # Forward any queries we can't answer
- forwarders {
-<% node[:bind][:forwarders].each do |forwarder| -%>
- <%= forwarder %>;
-<% end -%>
- };
-<% end -%>
-
# Only allow queries from our machines
- allow-query { osm; };
+ allow-query { localnets; };
# Don't allow transfers
allow-transfer { none; };
description "Master role applied to fafnir"
default_attributes(
- :bind => {
- :clients => "equinix-dub"
- },
:dhcpd => {
:first_address => "10.0.79.1",
:last_address => "10.0.79.254"
description "Master role applied to ironbelly"
default_attributes(
- :bind => {
- :clients => "equinix-ams"
- },
:dhcpd => {
:first_address => "10.0.63.1",
:last_address => "10.0.63.254"
:max_connections_per_child => 10000
}
},
- :bind => {
- :clients => "ucl"
- },
:dhcpd => {
:first_address => "10.0.15.1",
:last_address => "10.0.15.254"