{"id":23015320,"url":"https://github.com/icann-dns/puppet-dns","last_synced_at":"2025-08-14T07:32:00.842Z","repository":{"id":57670333,"uuid":"60626905","full_name":"icann-dns/puppet-dns","owner":"icann-dns","description":"Meta package used to switch between puppet-nsd and puppet-knot","archived":false,"fork":false,"pushed_at":"2024-01-09T11:05:22.000Z","size":283,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-09T23:45:28.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icann-dns.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-07T15:57:41.000Z","updated_at":"2024-01-09T09:09:21.000Z","dependencies_parsed_at":"2022-09-26T20:41:00.533Z","dependency_job_id":null,"html_url":"https://github.com/icann-dns/puppet-dns","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icann-dns%2Fpuppet-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icann-dns%2Fpuppet-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icann-dns%2Fpuppet-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icann-dns%2Fpuppet-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icann-dns","download_url":"https://codeload.github.com/icann-dns/puppet-dns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229810596,"owners_count":18127668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T11:12:02.107Z","updated_at":"2024-12-15T11:12:02.640Z","avatar_url":"https://github.com/icann-dns.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/icann-dns/puppet-dns.svg?branch=master)](https://travis-ci.org/icann-dns/puppet-dns)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/icann/dns.svg?maxAge=2592000)](https://forge.puppet.com/icann/dns)\n[![Puppet Forge Downloads](https://img.shields.io/puppetforge/dt/icann/dns.svg?maxAge=2592000)](https://forge.puppet.com/icann/dns)\n\n# dns\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with dns](#setup)\n    * [What dns affects](#what-dns-affects)\n    * [Setup requirements](#setup-requirements)\n    * [Beginning with dns](#beginning-with-dns)\n4. [Usage - Configuration options and additional functionality](#usage)\n    * [Basic Config](#basic-config)\n    * [Master Slave Config](#master-slave-config)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n5. [Limitations - OS compatibility, etc.](#limitations)\n6. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nManage the installation and configuration of knot and nsd installations.  Also allows for managing master -\u003e slave relations via exported resources.\n\n## Module Description\n\nThis module acts as an interface to icann-nsd and icann-knot to allow the same config yto manage both servers and ease switch between the two daemons.  It can also use exportedconcat resources to manage master slave relationships\n\n## Setup\n\n### What dns affects\n\n* installs and manages icann-knot\n* installs and manages icann-nsd\n* dynamicly sets processor count based on installed processes\n* Optionaly install zonecheck python library and associated cron job.  (if thier is a problem with dns a custom fact is created which can be used by other modules, see icann-quagga)\n\n### Beginning with dns\n\ninstall either a dns daemon, which one depends on OS:\n\n```puppet \nclass { '::dns': }\n```\n\nForce a specific daemon and disable zonecheck\n\n```puppet\nclass { '::dns':\n  daemon =\u003e 'knot',\n  enable_zonecheck =\u003e false,\n}\n```\n\nand in hiera\n\n```yaml\ndns::daemon: knot\ndns::enable_zonecheck: false\n```\n\n## Usage\n\n### Basic Config\n\nAdd config with primary tsig key\n\n```puppet\nclass {'::dns':\n  default_tsig_name: 'test',\n  tsigs =\u003e {\n    'test',=\u003e  {\n      'algo' =\u003e 'hmac-sha256',\n      'data' =\u003e 'adsasdasdasd='\n    }\n  }\n}\n```\n\nor with hiera\n\n```yaml\nnsd::default_tsig_name: test\nnsd::tsigs:\n  test:\n    algo: hmac-sha256\n    data: adsasdasdasd=\n```\n\nadd zone files.  zone files are added with sets of common config.\n\n```puppet\nclass {'::nsd':\n  remotes =\u003e {\n    master_v4 =\u003e { 'address4' =\u003e '192.0.2.1' },\n    master_v6 =\u003e { 'address6' =\u003e '2001:DB8::1' },\n    slave     =\u003e { 'address4' =\u003e '192.0.2.2' },\n  }\n  zones =\u003e {\n    'example.com' =\u003e {\n      'masters' =\u003e ['master_v4', 'master_v6']\n      'provide_xfrs'  =\u003e ['slave'],\n    },\n    'example.net' =\u003e {\n      'masters' =\u003e ['master_v4', 'master_v6']\n      'provide_xfrs'  =\u003e ['slave'],\n    }\n    'example.org' =\u003e {\n      'masters' =\u003e ['master_v4', 'master_v6']\n      'provide_xfrs'  =\u003e ['slave'],\n    }\n  }\n}\n```\n\nin hiera\n\n```yaml\nnsd::remotes:\n  master_v4:\n    address4: 192.0.2.1\n  master_v6:\n    address4: 2001:DB8::1\n  slave:\n    address4: 192.0.2.2\nnsd::zones:\n  example.com:\n    masters: \u0026id001\n    - master_v4\n    - master_v6\n    provide_xfrs: \u0026id002\n    - slave\n  example.net:\n    masters: *id001\n    slave: *id002\n  example.org:\n    masters: *id001\n    slave: *id002\n```\n\ncreate and as112 server\n\n```puppet\nclass {'::nsd::as112': }\n```\n\n#### Master Slave Config\n\nThis module makes exports dns::tsig and dns::remote objects from one set of servers and imports them into another set of servers to allow you to configure master slave relations\n\nThe parameters `dns::imports` and `dns::exports` are used to create pairs.  if one server has `dns::exports = ['test']` then a master server would import this config by including `dns::imports = ['test']`.  The way that the importing and exporting works in the nsd and knot modules assumes you are running a monolithic install.  Other puppet configuerations will need some effort to get working.\n\n####  Simple master server example\n\nThe following is an example where we have one server pull the root zones from xfr.dns.icann.org and then distributes the zones to a second layer of dns servers that use tsig keys, note the TSIG key was created specificly for this example it should not be used in a production environment.  the following examples will use hiera for config\n\n##### Distributions server\nAssume the ip address of this server is 192.0.2.1\n\n```puppet\ninclude dns\n```\n\n```yaml\ndns::imports: ['rootserver']\ndns::remotes:\n  lax.xfr.dns.icann.org:\n    address4: 192.0.32.132\n    address6: 2620:0:2d0:202::132\n  iad.xfr.dns.icann.org:\n    address4: 192.0.47.132\n    address6: 2620:0:2830:202::132\ndns::default_masters:\n- lax.xfr.dns.icann.org\n- iad.xfr.dns.icann.org\ndns::zones:\n  '.':\n    zonefile: root\n  'arpa.': {}\n  'root-servers.net.': {}\n```\n\n##### Edge server\ndns::exports: ['rootserver']\ndns::tsigs:\n  edge_tsig:\n    data: 'qneKJvaiXqVrfrS4v+Oi/9GpLqrkhSGLTCZkf0dyKZ0='\ndns::remotes:\n  distribution_server:\n    address4: 192.0.2.1\ndns::default_masters:\n- distribution_server\ndns::zones:\n  '.':\n    zonefile: root\n  'arpa.': {}\n  'root-servers.net.': {}\n\n####  Complex master server example\n\n  The following is an example where we have three layers of server top layer -\u003e middle -\u003e edge.  The basics of this is to demonstrate how a server (middle) can both import and export configuration.  This example will also use hiera  with a hierarchy as follows, this allows you to configure the zones in one common locations and the relations ships in the node specific files, this allows you to configure the zones in one common locations and the relations ships in the node specific files\n\n```yaml\n:hierarchy:\n  - \"nodes/%{trusted.certname}\"\n  - \"common\"\n```\n##### Common.yaml\n\n```yaml\ndns::zones:\n  in-addr.arpa: {}\n  in-addr-servers.arpa: {}\n  ip6.arpa: {}\n  ip6-servers.arpa: {}\n  mcast.net: {}\n  as112.arpa: {}\n  example.com: {}\n  example.edu: {}\n  example.net: {}\n  example.org: {}\n  ipv4only.arpa: {}\n  224.in-addr.arpa: {}\n  225.in-addr.arpa: {}\n  226.in-addr.arpa: {}\n  227.in-addr.arpa: {}\n  228.in-addr.arpa: {}\n  229.in-addr.arpa: {}\n  230.in-addr.arpa: {}\n  231.in-addr.arpa: {}\n  232.in-addr.arpa: {}\n  233.in-addr.arpa: {}\n  234.in-addr.arpa: {}\n  235.in-addr.arpa: {}\n  236.in-addr.arpa: {}\n  237.in-addr.arpa: {}\n  238.in-addr.arpa: {}\n  239.in-addr.arpa: {}\n```\n#####  Top layer server:\nAssume the ip address of this server is 192.0.2.1\n\n```yaml\ndns::imports: ['top_layer']\ndns::daemon: nsd\ndns::remotes:\n  lax.xfr.dns.icann.org:\n    address4: 192.0.32.132\n    address6: 2620:0:2d0:202::132\n  iad.xfr.dns.icann.org:\n    address4: 192.0.47.132\n    address6: 2620:0:2830:202::132\ndns::default_masters:\n- lax.xfr.dns.icann.org\n- iad.xfr.dns.icann.org\n```\n\n#####  Mid layer server:\nAssume the ip address of this server is 192.0.2.2\n\n```yaml\ndns::exports: ['top_layer']\ndns::imports: ['mid_layer']\ndns::default_tsig_name: mid_layer_tsig\ndns::tsigs:\n  mid_layer_tsig:\n    data: qneKJvaiXqVrfrS4v+Oi/9GpLqrkhSGLTCZkf0dyKZ0=\ndns::remotes:\n  top_server:\n    address4: 192.0.2.1\ndns::default_masters:\n- top_server\n```\n\n##### Edge layer server\n```yaml\ndns::exports: ['mid_layer']\ndns::default_tsig_name: edge_layer_key\ndns::tsigs:\n  edge_layer_key:\n    L7WLyxJGM5X8tfmzMKdfaQt369JWxAMTmm09ZFgMTc4=\ndns::remotes:\n  mid_layer_server:\n    address4: 192.0.2.2\ndns::default_masters:\n- mid_layer_server\n```\n\n## Development\n\nPull requests welcome but please also update documentation and tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficann-dns%2Fpuppet-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficann-dns%2Fpuppet-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficann-dns%2Fpuppet-dns/lists"}