diff options
author | Micah <micah@leap.se> | 2016-05-24 10:19:33 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-05-24 10:19:33 -0400 |
commit | c9be0212c9e45f609d299f5fbdf8f13a63747be6 (patch) | |
tree | 943935add27bb5b1a159cfdb46225f4c1f9014ba /manifests/forward.pp |
Squashed 'puppet/modules/unbound/' content from commit a26b91d
git-subtree-dir: puppet/modules/unbound
git-subtree-split: a26b91dfea3189e6777629fa00d54f51dc41f4d4
Diffstat (limited to 'manifests/forward.pp')
-rw-r--r-- | manifests/forward.pp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/manifests/forward.pp b/manifests/forward.pp new file mode 100644 index 00000000..740c004d --- /dev/null +++ b/manifests/forward.pp @@ -0,0 +1,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, + } +} |