puppet-bind/manifests/view.pp
Nate Riffe 40531e21eb Implement a helper script for zone reloads
It turns out the `rndc` command that was intended to reload a managed zone
wasn't working (see PR #91 for reference) if more than one view included the
zone. The helper script is really just a wrapper around the `rndc` command
itself, it translates its final parameter into a domain/class/view tuple and
pass the leading parameters and the tuple to `rndc`.
2016-07-07 21:15:41 -05:00

34 lines
1.1 KiB
Puppet

# ex: syntax=puppet si ts=4 sw=4 et
define bind::view (
$match_clients = 'any',
$match_destinations = '',
$servers = {},
$zones = [],
$recursion = true,
$recursion_match_clients = 'any',
$recursion_match_destinations = '',
$recursion_match_only = false,
$allow_transfers = '',
$notify_source = '',
$also_notify = '',
$empty_zones = '',
$order = '10',
$minimal_responses = false,
) {
$confdir = $::bind::confdir
$default_zones_include = $::bind::default_zones_include
$include_default_zones = $::bind::include_default_zones
concat::fragment { "bind-view-${name}":
order => $order,
target => "${::bind::confdir}/views.conf",
content => template('bind/view.erb'),
}
concat::fragment { "bind-view-mappings-${name}":
target => "${::bind::confdir}/view-mappings.txt",
content => template('bind/view-mappings.erb'),
}
}