summaryrefslogtreecommitdiff
path: root/manifests/forward.pp
blob: 740c004d7ebe2597df23d7e4f305fcd6d10313a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# == Define: unbound::forward
#
# Creates a forward-zone.  $settings is a hash containing the settings.
# The name of the resource is used as the 'name' of the zone.
#
# === Parameters
#
# [*settings*]
# Hash containing the settings as key value pairs.
#
# === Examples
#
# unbound::forward { 'example.com':
#   settings => {
#     forward-addr => '10.0.0.1',
#   },
# }
#
define unbound::forward (
  $settings,
) {
  include unbound

  $zone_name = { name => "\"${title}\"" }
  $real_settings = { forward-zone => merge($zone_name, $settings) }

  concat::fragment { "unbound ${title}":
    target => $unbound::params::config,
    content => template('unbound/unbound.conf.erb'),
    order => 3,
  }
}