From c9be0212c9e45f609d299f5fbdf8f13a63747be6 Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 24 May 2016 10:19:33 -0400 Subject: Squashed 'puppet/modules/unbound/' content from commit a26b91d git-subtree-dir: puppet/modules/unbound git-subtree-split: a26b91dfea3189e6777629fa00d54f51dc41f4d4 --- manifests/stub.pp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 manifests/stub.pp (limited to 'manifests/stub.pp') diff --git a/manifests/stub.pp b/manifests/stub.pp new file mode 100644 index 00000000..02797fdb --- /dev/null +++ b/manifests/stub.pp @@ -0,0 +1,32 @@ +# == Define: unbound::stub +# +# Creates a stub-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::stub { $::domain: +# settings => { +# stub-addr => '192.168.1.1', +# }, +# } +# +define unbound::stub ( + $settings, +) { + include unbound::params + + $zone_name = { name => "\"${title}\"" } + $real_settings = { stub-zone => merge($zone_name, $settings) } + + concat::fragment { "unbound ${title}": + target => $unbound::params::config, + content => template('unbound/unbound.conf.erb'), + order => 2, + } +} -- cgit v1.2.3