Defined Type: nsd::key
- Defined in:
- manifests/key.pp
Overview
Define a TSIG key in NSD.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'manifests/key.pp', line 16
define nsd::key (
NSD::Algorithm $algorithm,
String $secret,
Bodgitlib::Zone::NonRoot $key = $title,
) {
if ! defined(Class['::nsd']) {
fail('You must include the nsd base class before using any nsd defined resources')
}
if versioncmp($::puppetversion, '4.9.0') >= 0 {
if $secret != String(Binary($secret), '%B') {
fail('Key secret is not Base64-encoded correctly')
}
}
::concat::fragment { "nsd key ${key}":
content => template("${module_name}/key.erb"),
order => '10',
target => "${::nsd::conf_dir}/nsd.conf",
}
}
|