summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests/caching_resolver.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_config/manifests/caching_resolver.pp')
-rw-r--r--puppet/modules/site_config/manifests/caching_resolver.pp35
1 files changed, 35 insertions, 0 deletions
diff --git a/puppet/modules/site_config/manifests/caching_resolver.pp b/puppet/modules/site_config/manifests/caching_resolver.pp
new file mode 100644
index 00000000..e4374d8f
--- /dev/null
+++ b/puppet/modules/site_config/manifests/caching_resolver.pp
@@ -0,0 +1,35 @@
+class site_config::caching_resolver {
+
+ # Setup a conf.d directory to place additional unbound configuration files
+ # there must be at least one file in the directory, or unbound will not
+ # start, so create an empty placeholder to ensure this
+ file {
+ '/etc/unbound/conf.d':
+ ensure => directory,
+ owner => root, group => root, mode => '0755';
+
+ '/etc/unbound/conf.d/placeholder':
+ ensure => present,
+ content => '',
+ owner => root, group => root, mode => '0644';
+ }
+
+ class { 'unbound':
+ root_hints => false,
+ anchor => false,
+ ssl => false,
+ require => File['/etc/unbound/conf.d/placeholder'],
+ settings => {
+ server => {
+ verbosity => '1',
+ interface => [ '127.0.0.1', '::1' ],
+ port => '53',
+ hide-identity => 'yes',
+ hide-version => 'yes',
+ harden-glue => 'yes',
+ access-control => [ '127.0.0.0/8 allow', '::1 allow' ],
+ include => '/etc/unbound/conf.d/*'
+ }
+ }
+ }
+}