Forge Home


Puppet NSD management module


1,820 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.3.0 (latest)
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.0.0
  • 0.4.2
  • 0.4.1
  • 0.3.8
  • 0.3.7
  • 0.3.6
  • 0.3.5
  • 0.3.4
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.1.1
released Dec 28th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.1.0 < 6.0.0
  • ,
This module has been deprecated by its author since Jun 16th 2021.

The author has suggested puppet-nsd as its replacement.

Start using this module

Tags: dns, openbsd


zleslie/nsd — version 1.3.0 Dec 28th 2019

Puppet powered DNS with NSD

Puppet Forge Build Status

A Puppet module for the NSD authoritative resolver.

Supported Platforms

  • OpenBSD
  • FreeBSD


The concat module must be installed. It can be obtained from Puppet Forge:

puppet module install puppetlabs/concat

Or add this line to your Puppetfile and deploy with R10k:

mod 'concat', :git => 'git://'


Server Setup

At minimum you only need to include the class nsd. The defaults are reasonable for running nsd on a stand-alone host.

include nsd
include nsd::remote

If you have it running in pair with unbound, you may want to set the port nsd listens on:

class { 'nsd':
  port => '5353',

Remote Control

The NSD remote controls the use of the nsd-control utility to issue commands to the NSD daemon process.

include nsd::remote

Zone Management

Without Hiera

Deploying zone files is simple. A resource per zone is in order. For example:

nsd::zone { '':
  template => 'mysite/dns/'

The template string is passed directly to a File resource, so the same path should apply that would be used in the File resource.

Use the nsd::zonepurge boolean to enable purging unmanaged zone files.

With Hiera

You can use hiera-file or the template directory to store your zone files that you want to have deployed to your NSD server. The default is to pick them up from the modules template directory.

If you are using hiera, you may have the configuration like the following example, additionally to the rest of your NSD configuration, for one forward and one reverse zone:

  templatestorage: hiera
      template: ''
      template: ''

The templatestorage parameter tells puppet to lookup the files with hiera-file.

$nsd_config = hiera_hash('nsd_config')
create_resources(nsd::zone, $nsd_config['zones'], { templatestorage => $nsd_config['templatestorage'] })

Unbound Operation

When NSD and Unbound are combined, a robust DNS solution can emerge. One little convenience is to notify the Unbound service when any of the zone files change. Add the following to the top of the scope where your nsd::zone resources are managed.

Nsd::Zone {
  notify => Service['unbound'],

More information

You can find more information about NSD and its configuration at


Please help me make this module awesome! Send pull requests and file issues.