|
166 | 166 | # @param username see https://nlnetlabs.nl/documentation/unbound/unbound.conf/
|
167 | 167 | # @param package_name The package(s) to install to get unbound
|
168 | 168 | # @param package_ensure the ensure value for the packages
|
169 |
| -# @param purge_unbound_conf_d if true all unmanaged files in $unbound_conf_d will be purged |
170 | 169 | # @param root_hints_url the url to download the root hints file
|
171 | 170 | # @param runtime_dir the runtime directory used
|
172 | 171 | # @param auto_trust_anchor_file see https://nlnetlabs.nl/documentation/unbound/unbound.conf/
|
|
203 | 202 | # @param redis_server_host see https://nlnetlabs.nl/documentation/unbound/unbound.conf/
|
204 | 203 | # @param redis_server_port see https://nlnetlabs.nl/documentation/unbound/unbound.conf/
|
205 | 204 | # @param redis_timeout see https://nlnetlabs.nl/documentation/unbound/unbound.conf/
|
206 |
| -# @param unbound_conf_d similar to conf_d, will be merged with conf_d version in future |
207 | 205 | # @param hints_file the root hints file to use
|
208 | 206 | # @param update_root_hints f we should update the root hints file
|
209 | 207 | # @param hints_file_content the contents of the root hints file
|
|
377 | 375 | # OpenBSD sets this to an empty string
|
378 | 376 | Variant[String,Array] $package_name = 'unbound',
|
379 | 377 | String[1] $package_ensure = 'installed',
|
380 |
| - Boolean $purge_unbound_conf_d = false, |
| 378 | + Boolean $purge_conf_d = false, |
381 | 379 | String[1] $root_hints_url = 'https://www.internic.net/domain/named.root',
|
382 | 380 | Stdlib::Absolutepath $runtime_dir = $confdir,
|
383 | 381 | Stdlib::Absolutepath $auto_trust_anchor_file = "${runtime_dir}/root.key",
|
|
414 | 412 | String[1] $redis_server_host = '127.0.0.1',
|
415 | 413 | Integer[1,65536] $redis_server_port = 6379,
|
416 | 414 | Integer[1] $redis_timeout = 100,
|
417 |
| - Stdlib::Absolutepath $unbound_conf_d = "${confdir}/unbound.conf.d", |
418 | 415 | Unbound::Hints_file $hints_file = "${confdir}/root.hints",
|
419 | 416 | Enum['absent','present','unmanaged'] $update_root_hints = fact('systemd') ? { true => 'present', default => 'unmanaged' },
|
420 | 417 | Optional[String[1]] $hints_file_content = undef,
|
421 | 418 | Hash[String[1], Unbound::Rpz] $rpzs = {},
|
422 | 419 | Optional[String[1]] $unbound_version = $facts['unbound_version'],
|
423 | 420 | ) {
|
424 |
| - $_base_dirs = [$confdir, $conf_d, $keys_d, $runtime_dir] |
| 421 | + $_base_dirs = [$confdir, $keys_d, $runtime_dir] |
425 | 422 | $_piddir = if $pidfile { dirname($pidfile) } else { undef }
|
426 | 423 | if $_piddir and !($_piddir in ['/run', '/var/run']) {
|
427 | 424 | $dirs = unique($_base_dirs + [$_piddir])
|
|
541 | 538 | }
|
542 | 539 |
|
543 | 540 | # purge unmanaged files in configuration directory
|
544 |
| - file { $unbound_conf_d: |
| 541 | + file { $conf_d: |
545 | 542 | ensure => 'directory',
|
546 |
| - owner => 'root', |
547 |
| - group => '0', |
548 |
| - purge => $purge_unbound_conf_d, |
549 |
| - recurse => $purge_unbound_conf_d, |
| 543 | + owner => $owner, |
| 544 | + purge => $purge_conf_d, |
| 545 | + recurse => $purge_conf_d, |
550 | 546 | }
|
551 | 547 |
|
552 | 548 | concat { $config_file:
|
|
0 commit comments