{"id":21129602,"url":"https://github.com/pimvh/nsd","last_synced_at":"2026-04-19T03:02:01.342Z","repository":{"id":151279181,"uuid":"568832178","full_name":"pimvh/nsd","owner":"pimvh","description":"Ansible role to configure NSD","archived":false,"fork":false,"pushed_at":"2024-05-20T18:50:14.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T15:59:12.994Z","etag":null,"topics":["ansible","dns-server","dnssec","molecule-tested","nsd","role","zsk-rollover"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pimvh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-21T14:01:06.000Z","updated_at":"2024-05-20T18:50:17.000Z","dependencies_parsed_at":"2024-11-20T21:19:26.147Z","dependency_job_id":null,"html_url":"https://github.com/pimvh/nsd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pimvh/nsd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pimvh","download_url":"https://codeload.github.com/pimvh/nsd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimvh%2Fnsd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ansible","dns-server","dnssec","molecule-tested","nsd","role","zsk-rollover"],"created_at":"2024-11-20T05:26:02.747Z","updated_at":"2026-04-19T03:02:01.304Z","avatar_url":"https://github.com/pimvh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Molecule test](https://github.com/pimvh/nsd/actions/workflows/test.yaml/badge.svg)\n# Requirements\n\n1. Ansible installed:\n\n```\nsudo apt install python3\npython3 -m ensurepip --upgrade\npip3 install ansible\n```\n\n2. The Ansible controller needs to have `date` installed, see `defaults.yaml`.\n\nThis is in order to automagically generate a DNS serial.\n\n## Required variables\n\nReview the variables as shown in defaults.\n\n# Example playbook\n\n```\nhosts:\n  - foo\nroles:\n  - pimvh.nsd\n\n```\n\nVariable structure:\n\n```\n# list of all zones\n\nnsd_zone_attributes:\n  - name: \"\u003c\u003c zone_name \u003e\u003e\"\n    ttl: 300\n    dns_refresh: 300\n    dns_retry: 300\n    dns_expire: 300\n    dns_negative_response_cache: 300\n    make_ascii: true\n    dkim_enabled: true\n    dkim_domain: \"\u003c\u003c dkim domain \u003e\u003e\"\n    dkim_keys: \"{{ list of dkim_keys }}\"\n    dnssec_enabled: true\n    dnssec_algo: ECDSAP384SHA384\n    zsk_validity_period: \"7\" \u003c-- in days\n    zsk_grace_period: \"24\" \u003c-- in hours\n    zsk_rotation_day: \"3\" \u003c-- weekday starting at 0\n    dnssec_propagation_delay: \"24\" \u003c-- in hours\n    reverse_zone_enabled: true\n    reverse_zone_name_v4: \"{{ assigned_range_ipv4 | get_rev_dns_origin }}\" \u003c-- Use supplied filter to calculate rev dns for a zone,\n    reverse_zone_name_v6: \"{{ assigned_range_ipv6 | get_rev_dns_origin(version=6) }}\" \u003c-- idem, but for v6.\n\n\"nsd_\u003c\u003c your zone with _ instead of . \u003e\u003e_records\":\n  - id: \"@\"\n    type: NS\n    record: \"ns1\"\n  - id: \"@\"\n    type: A\n    record: \"127.0.0.1\"\n    no_ptr: true \u003c-- supply no_ptr for it to not show up in the PTR file\n  - id: \"@\"\n    type: AAAA\n    record: \"::1\"\n    no_ptr: true \u003c-- supply no_ptr for it to not show up in the PTR file\n  - id: \"@\"\n    type: MX\n    value: 10\n    record: \"{{ nsd_zone_name | default('') }}.\" \u003c-- you can use the name of the zone in here\n    type: CNAME\n    record: \"@\"\n# e.g. SPF record:\n  - id: \"@\"\n    type: \"TXT\"\n    record: \"v=spf1 ip4:\u003c\u003c ipv4_addr \u003e\u003e ip6:\u003c\u003c ipv6_addr \u003e\u003e ~all\" \u003c--\n  - type: \"raw\"\n    record: \u003e-\n        \u003c\u003c some_raw_record, which will be placed in the file directly \u003e\u003e\n\n```\n\n# TLDR - What will happen if I run this\n\n- Run dependency [systemd-failmail](https://github.com/pimvh/systemd-failmail)\n- Validate whether variables are all defined\n- Install nsd (nsd_install set)\n- Create a bunch of required directories for NSD and ZSK and KSK organisation\n- Setup nsd-control with certificates\n- Setup zones and move dnssecpls script (when dnssec is enabled)\n- Setup dnssecpls service (when dnssec is enabled)\n\n# Future Improvements\n\n- Allow non authorative zones and key directives\n- Improve sane defaults of variables (see defaults defined in defaults/main.yaml)\n- Allow TTL to be passed in records\n- Add automated KSK rollover to dnssecpls script\n- Allow duplicates of dnssecpls script with different variables from ZSK rollover etc as specified in nsd_zone_attributes\n\n# Sources\n\nUsed as inspiration.\n\n\u003chttps://ubuntu.com/server/docs/service-domain-name-service-dns\u003e\n\u003chttps://www.digitalocean.com/community/tutorials/how-to-configure-nsd-as-a-private-network-dns-server-on-debian-9\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimvh%2Fnsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimvh%2Fnsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimvh%2Fnsd/lists"}