Merge branch '6.0-prerelease'
Conflicts: metadata.json
This commit is contained in:
commit
da2a88ec86
@ -13,7 +13,7 @@ compliance with [RFC 1912](https://www.ietf.org/rfc/rfc1912.txt). The content
|
|||||||
of these zones is standardized, and the zone files for them are maintained by
|
of these zones is standardized, and the zone files for them are maintained by
|
||||||
the package distributor.
|
the package distributor.
|
||||||
|
|
||||||
## Change Is Coming
|
## Version 5.x vs. version 6.x of `puppet-bind`
|
||||||
|
|
||||||
<a name="warning"></a>
|
<a name="warning"></a>
|
||||||
### The Warning
|
### The Warning
|
||||||
@ -30,10 +30,10 @@ If you are seeing this warning, it is because starting in version 6.0.0 certain
|
|||||||
catalog application failures. There are [steps](#configuration-changes) to take
|
catalog application failures. There are [steps](#configuration-changes) to take
|
||||||
prior to version 6.0.0 to prepare for it.
|
prior to version 6.0.0 to prepare for it.
|
||||||
|
|
||||||
### The Present: Debian and Red Hat Divergence
|
### Older versions: Debian and Red Hat Divergence
|
||||||
|
|
||||||
The treatment of default zones in this module has been different between Debian
|
The treatment of default zones in versions 5.x and earlier of this module has
|
||||||
and Red Hat systems until now.
|
differed between Debian and Red Hat systems.
|
||||||
|
|
||||||
On Debian systems, the `bind9` package installs a separate configuration file
|
On Debian systems, the `bind9` package installs a separate configuration file
|
||||||
at `/etc/bind/named.conf.default-zones` which defines these zones and also
|
at `/etc/bind/named.conf.default-zones` which defines these zones and also
|
||||||
@ -49,7 +49,7 @@ rewrites this file, these definitions are lost.
|
|||||||
|
|
||||||
In both cases, the current behavior is not configurable and always happens.
|
In both cases, the current behavior is not configurable and always happens.
|
||||||
|
|
||||||
### The Future: Consistency with Flexibility
|
### Version 6.x and later: Consistency with Flexibility
|
||||||
|
|
||||||
Starting in version 6.0.0 of this module, default zones will be preserved on
|
Starting in version 6.0.0 of this module, default zones will be preserved on
|
||||||
both Debian and Red Hat, with the option of disabling them. This will not
|
both Debian and Red Hat, with the option of disabling them. This will not
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
[](http://travis-ci.org/inkblot/puppet-bind)
|
[](http://travis-ci.org/inkblot/puppet-bind)
|
||||||
|
|
||||||
**IMPORTANT UPGRADE INFORMATION:** In a future version of this module there
|
**IMPORTANT UPGRADE INFORMATION:** In version 6.0.0 of this module there are
|
||||||
will be significant changes to the handling of default zones that may require
|
significant changes to the handling of default zones that may require
|
||||||
preparations prior to upgrading. See [DEFAULT_ZONES.md](DEFAULT_ZONES.md) for
|
preparations prior to upgrading. See [DEFAULT_ZONES.md](DEFAULT_ZONES.md) for
|
||||||
details.
|
details.
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
bind::defaults::supported: false
|
bind::defaults::supported: false
|
||||||
bind::defaults::random_device: '/dev/random'
|
bind::defaults::random_device: '/dev/random'
|
||||||
bind::defaults::rndc: true
|
bind::defaults::rndc: true
|
||||||
bind::defaults::default_zones_warning: false
|
|
||||||
|
|
||||||
bind::forwarders: ''
|
bind::forwarders: ''
|
||||||
bind::dnssec: true
|
bind::dnssec: true
|
||||||
|
|||||||
@ -8,5 +8,6 @@ bind::defaults::nsupdate_package: 'dnsutils'
|
|||||||
bind::defaults::confdir: '/etc/bind'
|
bind::defaults::confdir: '/etc/bind'
|
||||||
bind::defaults::namedconf: '/etc/bind/named.conf'
|
bind::defaults::namedconf: '/etc/bind/named.conf'
|
||||||
bind::defaults::cachedir: '/var/cache/bind'
|
bind::defaults::cachedir: '/var/cache/bind'
|
||||||
|
bind::defaults::default_zones_include: '/etc/bind/named.conf.default-zones'
|
||||||
|
|
||||||
bind::updater::keydir: '/etc/bind/keys'
|
bind::updater::keydir: '/etc/bind/keys'
|
||||||
|
|||||||
@ -9,6 +9,7 @@ bind::defaults::managed_keys_directory: '/var/named/dynamic'
|
|||||||
bind::defaults::confdir: '/etc/named'
|
bind::defaults::confdir: '/etc/named'
|
||||||
bind::defaults::namedconf: '/etc/named.conf'
|
bind::defaults::namedconf: '/etc/named.conf'
|
||||||
bind::defaults::cachedir: '/var/named'
|
bind::defaults::cachedir: '/var/named'
|
||||||
bind::defaults::default_zones_warning: true
|
bind::defaults::default_zones_include: '/etc/named.default-zones.conf'
|
||||||
|
bind::defaults::default_zones_source: 'puppet:///modules/bind/RedHat/named.default-zones.conf'
|
||||||
|
|
||||||
bind::updater::keydir: '/etc/named/keys'
|
bind::updater::keydir: '/etc/named/keys'
|
||||||
|
|||||||
6
files/RedHat/named.default-zones.conf
Normal file
6
files/RedHat/named.default-zones.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
zone "." IN {
|
||||||
|
type hint;
|
||||||
|
file "named.ca";
|
||||||
|
};
|
||||||
|
|
||||||
|
include "/etc/named.rfc1912.zones";
|
||||||
@ -12,7 +12,8 @@ class bind::defaults (
|
|||||||
$bind_service = undef,
|
$bind_service = undef,
|
||||||
$nsupdate_package = undef,
|
$nsupdate_package = undef,
|
||||||
$managed_keys_directory = undef,
|
$managed_keys_directory = undef,
|
||||||
$default_zones_warning = undef,
|
$default_zones_include = undef,
|
||||||
|
$default_zones_source = undef,
|
||||||
) {
|
) {
|
||||||
unless is_bool($supported) {
|
unless is_bool($supported) {
|
||||||
fail('Please ensure that the dependencies of the bind module are installed and working correctly')
|
fail('Please ensure that the dependencies of the bind module are installed and working correctly')
|
||||||
|
|||||||
@ -8,8 +8,8 @@ class bind (
|
|||||||
$rndc = undef,
|
$rndc = undef,
|
||||||
$statistics_port = undef,
|
$statistics_port = undef,
|
||||||
$auth_nxdomain = false,
|
$auth_nxdomain = false,
|
||||||
$include_local = false,
|
|
||||||
$include_default_zones = true,
|
$include_default_zones = true,
|
||||||
|
$include_local = false,
|
||||||
) inherits bind::defaults {
|
) inherits bind::defaults {
|
||||||
|
|
||||||
File {
|
File {
|
||||||
@ -63,6 +63,12 @@ class bind (
|
|||||||
content => template('bind/named.conf.erb'),
|
content => template('bind/named.conf.erb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $include_default_zones and $default_zones_source {
|
||||||
|
file { $default_zones_include:
|
||||||
|
source => $default_zones_source,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class { 'bind::keydir':
|
class { 'bind::keydir':
|
||||||
keydir => "${confdir}/keys",
|
keydir => "${confdir}/keys",
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,8 @@ define bind::view (
|
|||||||
$minimal_responses = false,
|
$minimal_responses = false,
|
||||||
) {
|
) {
|
||||||
$confdir = $::bind::confdir
|
$confdir = $::bind::confdir
|
||||||
|
$default_zones_include = $::bind::default_zones_include
|
||||||
|
$include_default_zones = $::bind::include_default_zones
|
||||||
|
|
||||||
concat::fragment { "bind-view-${name}":
|
concat::fragment { "bind-view-${name}":
|
||||||
order => $order,
|
order => $order,
|
||||||
|
|||||||
@ -29,7 +29,6 @@ define bind::zone (
|
|||||||
$random_device = $::bind::defaults::random_device
|
$random_device = $::bind::defaults::random_device
|
||||||
$bind_user = $::bind::defaults::bind_user
|
$bind_user = $::bind::defaults::bind_user
|
||||||
$bind_group = $::bind::defaults::bind_group
|
$bind_group = $::bind::defaults::bind_group
|
||||||
$default_zones_warning = $::bind::defaults::default_zones_warning
|
|
||||||
$include_default_zones = $::bind::include_default_zones
|
$include_default_zones = $::bind::include_default_zones
|
||||||
|
|
||||||
$_domain = pick($domain, $name)
|
$_domain = pick($domain, $name)
|
||||||
@ -38,8 +37,8 @@ define bind::zone (
|
|||||||
default => $_domain
|
default => $_domain
|
||||||
}
|
}
|
||||||
|
|
||||||
if $include_default_zones and $default_zones_warning and member(['.', 'localhost', '127.in-addr.arpa', '0.in-addr.arpa', '255.in-addr.arpa'], $_domain) {
|
if $include_default_zones and member(['.', 'localhost', '127.in-addr.arpa', '0.in-addr.arpa', '255.in-addr.arpa'], $_domain) {
|
||||||
warning("The bind module will include a default definition for zone \"${_domain}\" starting in version 6.0.0. Please see https://github.com/inkblot/puppet-bind/blob/master/DEFAULT_ZONES.md for more information about how this will affect your configuration.")
|
fail("The bind module includes a default definition for zone \"${_domain}\" starting in version 6.0.0. Please see https://github.com/inkblot/puppet-bind/blob/master/DEFAULT_ZONES.md for more information about how this affects your configuration.")
|
||||||
}
|
}
|
||||||
|
|
||||||
unless !($masters != '' and ! member(['slave', 'stub'], $zone_type)) {
|
unless !($masters != '' and ! member(['slave', 'stub'], $zone_type)) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "inkblot/bind",
|
"name": "inkblot/bind",
|
||||||
"version": "5.2.2",
|
"version": "6.0.0",
|
||||||
"author": "inkblot",
|
"author": "inkblot",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"summary": "ISC BIND name server",
|
"summary": "ISC BIND name server",
|
||||||
|
|||||||
@ -47,6 +47,9 @@ view "<%= @name %>" {
|
|||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
<%- if @minimal_responses -%>
|
||||||
|
minimal-responses yes;
|
||||||
|
<%- end -%>
|
||||||
<%- if @also_notify and @also_notify != '' -%>
|
<%- if @also_notify and @also_notify != '' -%>
|
||||||
also-notify {
|
also-notify {
|
||||||
<%- Array(@also_notify).each do |server| -%>
|
<%- Array(@also_notify).each do |server| -%>
|
||||||
@ -57,11 +60,8 @@ view "<%= @name %>" {
|
|||||||
<%- if @notify_source and @notify_source != '' -%>
|
<%- if @notify_source and @notify_source != '' -%>
|
||||||
notify-source <%= @notify_source %>;
|
notify-source <%= @notify_source %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @minimal_responses -%>
|
<%- if @include_default_zones and @default_zones_include -%>
|
||||||
minimal-responses yes;
|
include "<%= @default_zones_include %>";
|
||||||
<%- end -%>
|
|
||||||
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
|
||||||
include "<%= @confdir %>/named.conf.default-zones";
|
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- Array(@zones).each do |zone| -%>
|
<%- Array(@zones).each do |zone| -%>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user