Defined Type: unbound::forward

Defined in:
manifests/forward.pp

Overview

Define a forward zone in Unbound.

Examples:

Use Google as forwarders

::unbound::forward { '.':
  forward_addr => [
    '8.8.8.8',
    '8.8.4.4',
  ],
}

Parameters:

  • zone (Bodgitlib::Zone) (defaults to: $title)
  • forward_host (Optional[Array[Bodgitlib::Hostname, 1]]) (defaults to: undef)
  • forward_addr (Optional[Array[Unbound::Interface::Incoming, 1]]) (defaults to: undef)
  • forward_first (Optional[Boolean]) (defaults to: undef)
  • forward_ssl_upstream (Optional[Boolean]) (defaults to: undef)

See Also:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'manifests/forward.pp', line 20

define unbound::forward (
  Bodgitlib::Zone                                  $zone                 = $title,
  Optional[Array[Bodgitlib::Hostname, 1]]          $forward_host         = undef,
  Optional[Array[Unbound::Interface::Incoming, 1]] $forward_addr         = undef,
  Optional[Boolean]                                $forward_first        = undef,
  Optional[Boolean]                                $forward_ssl_upstream = undef,
) {

  if ! defined(Class['::unbound']) {
    fail('You must include the unbound base class before using any unbound defined resources')
  }

  ::concat::fragment { "unbound forward ${zone}":
    content => template("${module_name}/forward.erb"),
    order   => "20-${zone}",
    target  => "${::unbound::conf_dir}/unbound.conf",
  }
}