92 Commits

Author SHA1 Message Date
1ad689e41d fix: rename files to .yaml
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 58s
2025-11-22 23:59:01 +01:00
73fc7feedb fix: prepare for INJECT_FACTS_AS_VARS 2025-11-22 23:59:01 +01:00
5ca6f22180 Merge pull request 'chore(deps): update davidanson/markdownlint-cli2-action action to v21' (#34) from renovate/davidanson-markdownlint-cli2-action-21.x into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 1m0s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-11-18 17:00:31 +00:00
b483664c5f chore(deps): update davidanson/markdownlint-cli2-action action to v21
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 56s
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (pull_request) Successful in 56s
Lint Markdown files / markdown-lint (pull_request) Successful in 9s
2025-11-17 20:00:29 +00:00
56e8079ce6 Merge pull request 'chore(deps): update actions/checkout action to v5.0.1' (#35) from renovate/actions into master
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 18s
2025-11-17 17:02:07 +00:00
8e3ad790f4 chore(deps): update actions/checkout action to v5.0.1
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 1m0s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 55s
Lint Markdown files / markdown-lint (push) Successful in 10s
2025-11-17 17:00:29 +00:00
234d1a95f1 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.11.0' (#33) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 3s
2025-11-10 14:03:19 +00:00
a9e8dd2dd1 chore(deps): update ansible/ansible-lint action to v25.11.0
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 44s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 2m27s
2025-11-10 14:00:31 +00:00
0c9e81f06d Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.2' (#32) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-10-08 13:02:09 +00:00
d6db96cf7d chore(deps): update ansible/ansible-lint action to v25.9.2
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 8s
Ansible Linter / ansible-lint (push) Successful in 25s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 1m21s
2025-10-08 13:00:28 +00:00
236421efb2 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.1' (#31) from renovate/actions into master
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 8s
Ansible Linter / ansible-lint (push) Successful in 16s
2025-10-01 13:01:15 +00:00
3232f5d400 chore(deps): update ansible/ansible-lint action to v25.9.1
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 25s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 1m22s
2025-10-01 13:00:28 +00:00
666146b6b3 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.0' (#29) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 5s
2025-09-19 20:02:52 +00:00
4ed30e396f chore(deps): update ansible/ansible-lint action to v25.9.0
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 18s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
2025-09-18 22:00:30 +00:00
8cd8caece1 chore(deps): update actions/checkout to v5.0.0
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 22s
Lint Markdown files / markdown-lint (push) Successful in 6s
2025-09-18 22:30:17 +02:00
6ee7e2a0ae fix: avoid interpolation of variable
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 1m7s
Lint Markdown files / markdown-lint (push) Successful in 10s
2025-09-18 18:54:38 +02:00
49623f7f52 fix(tasks): conditional result was 'None' of type 'NoneType'
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 15s
Lint Markdown files / markdown-lint (push) Successful in 3s
2025-09-18 18:32:37 +02:00
20b27e1e6b fix(tasks): conditional result was 'None' of type 'NoneType'
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 6s
2025-09-18 18:25:14 +02:00
d8a04d3f1b Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.2' (#28) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 15s
Lint Markdown files / markdown-lint (push) Successful in 15s
2025-08-21 16:01:47 +00:00
b6a5d1c924 chore(deps): update ansible/ansible-lint action to v25.8.2
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 9s
Lint Markdown files / markdown-lint (pull_request) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 26s
Ansible Linter / ansible-lint (pull_request) Successful in 1m3s
2025-08-21 16:00:29 +00:00
d0ed854384 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.1' (#27) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 14s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-08-14 01:01:58 +00:00
7e139fc571 chore(deps): update ansible/ansible-lint action to v25.8.1
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 1m20s
Ansible Linter / ansible-lint (push) Successful in 1m26s
2025-08-14 01:00:25 +00:00
c0e254bd94 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.0' (#26) from renovate/actions into master
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 56s
2025-08-13 16:01:52 +00:00
2cbd5d82a1 chore(deps): update ansible/ansible-lint action to v25.8.0
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 13s
Ansible Linter / ansible-lint (push) Successful in 21s
Lint Markdown files / markdown-lint (pull_request) Successful in 19s
Ansible Linter / ansible-lint (pull_request) Successful in 1m15s
2025-08-13 16:00:24 +00:00
4f727a2bc9 Merge pull request 'chore(deps): update actions/checkout action to v4.3.0' (#24) from renovate/actions into master
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 54s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-08-11 13:04:00 +00:00
ce76a15b09 chore(deps): update actions/checkout action to v4.3.0
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 57s
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (pull_request) Successful in 54s
Lint Markdown files / markdown-lint (pull_request) Successful in 9s
2025-08-11 13:00:51 +00:00
827e96463f fix(templating): adapt lstrip_blocks
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 56s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-08-10 18:32:38 +02:00
f3cbc1d81b fix(ansible-galaxy): adapt indentation
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 55s
2025-08-06 16:10:21 +02:00
b50fd28d22 fix(ansible-galaxy): add namespace
Some checks failed
Lint Markdown files / markdown-lint (push) Successful in 12s
Ansible Linter / ansible-lint (push) Failing after 55s
2025-08-06 15:22:23 +02:00
63ff0433ff fix(ansible-galaxy): adapt list of supported platforms
Some checks failed
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Failing after 48s
2025-08-06 11:44:48 +02:00
5939225733 fix(ansible-galaxy): remove namespace
Some checks failed
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Failing after 30s
2025-08-06 11:32:02 +02:00
974a128275 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.7.0' (#23) from renovate/actions into master
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 16s
Ansible Linter / ansible-lint (push) Successful in 42s
2025-07-29 22:02:40 +00:00
35e10931a4 chore(deps): update ansible/ansible-lint action to v25.7.0
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 12s
Ansible Linter / ansible-lint (push) Successful in 1m31s
Ansible Linter / ansible-lint (pull_request) Successful in 1m14s
Lint Markdown files / markdown-lint (pull_request) Successful in 11s
2025-07-29 22:00:44 +00:00
670820009c chore(deps): update ansible/ansible-lint action to v25.6.1
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 16s
Ansible Linter / ansible-lint (pull_request) Successful in 1m16s
Lint Markdown files / markdown-lint (push) Successful in 16s
Ansible Linter / ansible-lint (push) Successful in 15s
2025-06-19 10:00:23 +00:00
d38b75dae5 chore(deps): update ansible/ansible-lint action to v25.6.0
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 12s
Ansible Linter / ansible-lint (pull_request) Successful in 1m22s
Lint Markdown files / markdown-lint (push) Successful in 13s
Ansible Linter / ansible-lint (push) Successful in 53s
2025-06-17 19:00:24 +00:00
73f0d2b6bf chore(deps): update ansible/ansible-lint action to v25.5.0
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 15s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 45s
2025-05-31 12:04:40 +00:00
9321ee64a5 chore(ci): adapt workflow to lint markdown files
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 1m3s
2025-05-31 13:35:27 +02:00
4117cbda9a chore(ci): use DavidAnson/markdownlint-cli2-action
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 14s
2025-05-13 21:20:02 +02:00
0e6ad65746 chore(deps): update ansible/ansible-lint action to v25.4.0
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 1m10s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Lint Markdown files / markdown-lint (push) Successful in 7s
Ansible Linter / ansible-lint (push) Successful in 53s
2025-04-28 13:00:32 +00:00
36d8257cd2 style: use quotation marks for the name of an action
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 1m27s
Lint Markdown files / markdown-lint (push) Successful in 12s
2025-04-18 11:53:13 +02:00
220d23790a chore(deps): update git.cryptic.systems/volker.raschek/markdownlint docker tag to v0.44.0
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 57s
Lint Markdown files / markdown-lint (pull_request) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 56s
Lint Markdown files / markdown-lint (push) Successful in 11s
2025-04-14 23:03:26 +02:00
aa33cf1f5c fix(ci): remove requirements condition
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 1m0s
Lint Markdown files / markdown-lint (push) Successful in 11s
2025-04-14 22:50:04 +02:00
9b70a69a9a fix(ci): remove workflow_dispatch
Some checks failed
Ansible Linter / ansible-lint (push) Failing after 52s
Lint Markdown files / markdown-lint (push) Successful in 8s
2025-04-14 22:34:09 +02:00
5b9064cd65 fix(ci): rollback git.cryptic.systems/volker.raschek/markdownlint
Some checks failed
Ansible Linter / ansible-lint (push) Failing after 44s
Lint Markdown files / markdown-lint (push) Successful in 29s
2025-04-14 22:19:45 +02:00
8458f49975 fix(linter): ignore .gitea directory
Some checks failed
Ansible Linter / ansible-lint (push) Failing after 47s
Lint Markdown files / markdown-lint (push) Successful in 11s
2025-04-14 22:10:43 +02:00
ab0f34f217 fix(ci): rename workflows
Some checks failed
Ansible Linter / ansible-lint (push) Failing after 45s
Lint Markdown files / markdown-lint (push) Successful in 8s
2025-04-14 22:06:48 +02:00
85ee72fe17 fix(galaxy): set namespace
Some checks failed
Ansible Lint / ansible-lint (push) Failing after 44s
Markdown linter / markdown-lint (push) Successful in 11s
2025-04-14 22:01:54 +02:00
261cd45400 feat(act-runner): replace drone
Some checks failed
Ansible Lint / ansible-lint (push) Failing after 46s
Markdown linter / markdown-lint (push) Successful in 11s
2025-04-14 21:53:40 +02:00
3ed4cc4862 chore(renovate): use configuration preset
Some checks failed
continuous-integration/drone/push Build is failing
2025-04-01 22:22:33 +02:00
497d261e70 Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.43.0' (#13) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #13
2025-02-16 14:06:15 +00:00
345a8d3075 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.43.0
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2025-02-04 23:05:05 +00:00
20bf0a7f9b feat: support DNSSEC
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2024-05-22 20:23:24 +02:00
5bb333929b fix: add check to verify for newline char in zone files 2024-05-22 20:23:24 +02:00
ead1284611 doc: rename example domain 2024-05-22 20:23:24 +02:00
0a689b2e93 fix(meta): remove namespace 2024-03-27 12:47:49 +01:00
7083f5e711 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.39.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-01-28 23:02:20 +00:00
5bd3aab57b fix(renovate): update config
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-26 17:46:44 +01:00
7b7a1b05bc Merge pull request 'chore(deps): update git.cryptic.systems/volker.raschek/drone-email docker tag to v0.1.5' (#10) from renovate/git.cryptic.systems-volker.raschek-drone-email-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-21 13:19:55 +00:00
a2ff838c84 chore(deps): update git.cryptic.systems/volker.raschek/drone-email docker tag to v0.1.5
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-01-21 13:18:45 +00:00
b756b319dc chore(deps): update git.cryptic.systems/volker.raschek/drone-email to 0.1.4
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-21 14:13:22 +01:00
b77e30e319 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.38.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-12-09 16:18:26 +01:00
be4b20f584 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.37.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-09-22 19:52:54 +02:00
d6cfc50ce3 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.36.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-09-03 13:50:51 +02:00
19e6e3a5a0 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.35.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-06-17 23:00:48 +02:00
38b4533838 feat: support rndc
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-09 09:46:02 +02:00
90bdec9e98 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.34.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-06-09 09:11:16 +02:00
f8370dc77b style(lint): quote mode
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-26 22:22:07 +01:00
6607a726b7 fix(statics): export statics channel for localhost by default
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-02-19 12:19:41 +01:00
b2c61884ec fix: type of ansible bultin module
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-12 13:41:36 +01:00
55c3ccae08 fix: security channel file
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-11 16:00:33 +01:00
4ef83cee22 refac: adapt style to pass ansible-lint checks
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-08 21:47:45 +01:00
b35ba22a6d fix(galaxy): meta information
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-02-08 21:30:35 +01:00
66f7e70f48 fix(ci): pull always
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-02-08 21:24:54 +01:00
f9958f7cac fix(ci): run only on amd64 2023-02-08 21:24:54 +01:00
1356dd6824 fix(ci): ansible lint
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-02-08 18:36:44 +01:00
6b8b178405 fix: add linter
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-02-08 17:56:13 +01:00
b7cba859e2 fix: support update-policies
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-01-18 23:35:36 +01:00
937b6c85de fix: dnssec-vailidation
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-18 17:22:40 +01:00
d0db9e6944 fix: support port configuration of dns forwarder
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-09 17:54:59 +01:00
c19f3c9db4 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.33.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-01-07 19:51:40 +01:00
015463f33a fix: use a better task name to load os specific vars
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-28 22:05:11 +01:00
b50e939de5 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.32.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-08-21 16:51:25 +02:00
d16492d892 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.32.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-07-25 13:10:50 +02:00
63aa5de50d fix: add example for a forward zone
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-22 09:38:46 +02:00
6bf4cef2d3 chore(deps): update dependency docker.io/volkerraschek/markdownlint to v0.32.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-07-18 11:10:57 +02:00
271c874529 fix: add configuration options to set up forward zone
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-09 14:31:16 +02:00
0ecda4e57b fix: add configuration options to set up forward zone
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-09 13:24:29 +02:00
a96e09792c fix(ci): replace git repository with gitea instead of drone
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-27 20:13:27 +02:00
6f0e1d5134 fix(README): installation guide
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-11 14:23:17 +02:00
71c4e61fe8 fix(meta): name of the role
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-11 14:16:08 +02:00
d99dabc4f7 fix(meta): list of distributions 2022-04-11 14:15:26 +02:00
cd3bd685ce test(ubuntu): tested on ubuntu 2022-04-04 16:00:11 +02:00
29 changed files with 603 additions and 308 deletions

View File

@@ -1,3 +1,4 @@
---
skip_list: []
exclude_paths:
- .gitea/

View File

@@ -1,94 +0,0 @@
---
kind: pipeline
type: kubernetes
name: linter
platform:
os: linux
steps:
- name: markdown lint
commands:
- markdownlint *.md
image: docker.io/volkerraschek/markdownlint:0.31.1
resources:
limits:
cpu: 50
memory: 50M
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 50
memory: 25M
when:
status:
- changed
- failure
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: kubernetes
name: sync
platform:
os: linux
arch: amd64
steps:
- name: github
image: docker.io/appleboy/drone-git-push:latest
resources:
limits:
cpu: 50
memory: 25M
settings:
branch: master
remote: ssh://git@github.com/volker-raschek/bind9-role.git
force: true
ssh_key:
from_secret: ssh_key
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 50
memory: 25M
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/bind9-role

View File

@@ -0,0 +1,20 @@
name: Ansible Linter
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
jobs:
ansible-lint:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.1
- name: Run ansible-lint
uses: ansible/ansible-lint@v25.11.0
with:
args: "--config-file .ansible-lint"
setup_python: "true"

View File

@@ -0,0 +1,18 @@
name: Lint Markdown files
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
jobs:
markdown-lint:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.1
- uses: DavidAnson/markdownlint-cli2-action@v21.0.0
with:
globs: '**/*.md'

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.ansible

View File

@@ -45,19 +45,17 @@ MD012:
# MD013/line-length - Line length
MD013:
# Number of characters
line_length: 80
line_length: 120
# Number of characters for headings
heading_line_length: 80
heading_line_length: 120
# Number of characters for code blocks
code_block_line_length: 80
code_block_line_length: 120
# Include code blocks
code_blocks: false
# Include tables
tables: false
# Include headings
headings: true
# Include headings
headers: true
# Strict length checking
strict: false
# Stern length checking
@@ -70,11 +68,6 @@ MD022:
# Blank lines below heading
lines_below: 1
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
# Only check sibling headings
allow_different_nesting: true
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
MD025:
# Heading level
@@ -141,4 +134,4 @@ MD046:
# MD048/code-fence-style - Code fence style
MD048:
# Code fence syle
style: "backtick"
style: "backtick"

17
.yamllint.yaml Normal file
View File

@@ -0,0 +1,17 @@
#
# Documentation:
# https://yamllint.readthedocs.io/en/stable/
#
rules:
brackets:
forbid: false
min-spaces-inside: 0
max-spaces-inside: 2
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
indentation:
spaces: 2
indent-sequences: false
line-length:
max: 360

View File

@@ -1,14 +1,13 @@
# bind9-role
[![Build Status](https://drone.cryptic.systems/api/badges/volker.raschek/bind9-role/status.svg)](https://drone.cryptic.systems/volker.raschek/bind9-role)
[![Ansible Role](https://img.shields.io/ansible/role/d/58170)](https://galaxy.ansible.com/volker_raschek/bind9_role)
[![Ansible Role](https://img.shields.io/ansible/role/d/58170)](https://galaxy.ansible.com/volker_raschek/bind9)
With following role can be bind installed and configured.
## Installation
```bash
ansible-galaxy install volker_raschek.bind9_role
ansible-galaxy install volker_raschek.bind9
```
## Supported distributions

View File

@@ -1,10 +1,18 @@
---
bind9_acls:
- name: internalnets
- name: "internalnets"
permissions: []
# - "111.222.111.222"
bind9_controls: []
# - acls:
# - localhost
# inet: "127.0.0.1"
# port: "953"
# tsig_keys:
# - rndc
bind9_logging:
categories:
- name: "security"
@@ -33,17 +41,27 @@ bind9_options:
allow_update_forwarding: []
auth_nxdomain: false
blackhole: []
dnssec_validations: true
dnssec_accept_expired: false
dnssec_validation: "auto"
forwarders:
- "8.8.8.8" # Google IPv4
- "8.8.4.4" # Google IPv4
- "2001:4860:4860::8888" # Google IPv6
- "2001:4860:4860::8844" # Google IPv6
- "208.67.222.222" # OpenDNS IPv4
- "208.67.220.220" # OpenDNS IPv4
- "2620:0:ccc::2" # OpenDNS IPv6
- "2620:0:ccd::2" # OpenDNS IPv6
- ip: "8.8.8.8" # Google IPv4
port: "53"
- ip: "8.8.4.4" # Google IPv4
port: "53"
- ip: "2001:4860:4860::8888" # Google IPv6
port: "53"
- ip: "2001:4860:4860::8844" # Google IPv6
port: "53"
- ip: "208.67.222.222" # OpenDNS IPv4
port: "53"
- ip: "208.67.220.220" # OpenDNS IPv4
port: "53"
- ip: "2620:0:ccc::2" # OpenDNS IPv6
port: "53"
- ip: "2620:0:ccd::2" # OpenDNS IPv6
port: "53"
interface_interval: 0
key_directory: "/var/named/dnssec-keys"
listen_on_ipv4:
- "127.0.0.1"
listen_on_ipv6:
@@ -52,42 +70,99 @@ bind9_options:
minimal_responses: "no"
notify: "yes"
recursion: "yes"
update_policies: []
# - action: grant
# identity: keyname
# ruletype: name
# name: _acme-challenge.example.com.
# types:
# - TXT
transfer_format: "many-answers"
bind9_rndc_key:
name: ""
algorithm: ""
secret: ""
bind9_dnssec_keys: []
# - origin: "hellenthal.cryptic.systems"
# key_signing_key:
# private:
# filename: "{{ bind9_options.key_directory }}/example.com.private"
# content: "private key"
# public:
# filename: "{{ bind9_options.key_directory }}/example.com.private"
# content: "public key"
# zone_signing_key:
# private:
# filename: "{{ bind9_options.key_directory }}/example.com.private"
# content: "private key"
# public:
# filename: "{{ bind9_options.key_directory }}/example.com.private"
# content: "public key"
bind9_statics:
enabled: true
channels:
- inet: "127.0.0.1"
port: "8053"
acls:
- "localhost"
bind9_tsigkeys: []
# - name: "name"
# algorithm: "algorithm"
# secret: "secret"
bind9_views: []
# - name: external
# - name: "external"
# match_clients:
# - "!internalnets"
# - "any"
# zones:
# - allow_notify: []
# allow_query:
# - "any"
# allow_query_on: []
# allow_update: []
# allow_update_forwarding: []
# allow_transfer: []
# - config:
# allow_notify: []
# allow_query:
# - "any"
# allow_query_on: []
# allow_update: []
# allow_update_forwarding: []
# allow_transfer: []
# file: zones/external/db.local.example
# origin: "example.local."
# type: master
# notify: true
# file: zones/external/db.local.example
# origin: "example.local."
# type: master
# - name: internal
# - name: "internal"
# match_clients:
# - "!192.168.178.1"
# - "internalnets"
# - "127.0.0.0/8"
# zones:
# - allow_notify: []
# allow_query:
# - "any"
# allow_query_on: []
# allow_update: []
# allow_update_forwarding: []
# allow_transfer: []
# - config:
# allow_notify: []
# allow_query:
# - "any"
# allow_query_on: []
# allow_update: []
# allow_update_forwarding: []
# allow_transfer: []
# file: zones/internal/db.local.example
# origin: "example.local."
# type: master
# file: zones/internal/db.local.example
# origin: "example.local."
# type: master
# - config:
# allow_notify: []
# allow_query: []
# allow_query_on: []
# allow_update: []
# allow_update_forwarding: []
# allow_transfer: []
# forward: only
# forwarders:
# - 192.168.175.1
# origin: "gitlab-runner.external.local"
# type: forward
# file: "gitlab-runner.external.local"

View File

@@ -1,7 +1,7 @@
---
- name: restart named
systemd:
- name: Restart named
ansible.builtin.systemd:
name: "{{ bind_service_name }}"
state: restarted
daemon_reload: true

View File

@@ -1,23 +1,26 @@
dependencies: []
galaxy_info:
author: Markus Pesch
description: Role to install and configure bind9 on different distributions
company: Cryptic Systems
license: MIT
min_ansible_version: 2.1
platforms:
- name: Archlinux
versions:
- all
- name: Ubuntu
versions:
- 20.04
- name: RockyLinux
versions:
- 8.5
description: Role to install and configure bind9 on different distributions
galaxy_tags:
- named
- bind
- dyndns
dependencies: []
license: MIT
min_ansible_version: "2.9"
namespace: volker-raschek
platforms:
- name: ArchLinux
versions:
- all
- name: EL
versions:
- all
- name: Fedora
versions:
- all
- name: Ubuntu
versions:
- all
role_name: bind9

View File

@@ -1,17 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"assignees": [ "volker.raschek" ],
"automergeStrategy": "merge-commit",
"automergeType": "pr",
"labels": [ "renovate" ],
"packageRules": [
{
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
"automerge": true,
"matchManagers": "droneci",
"matchUpdateTypes": [ "minor", "patch"]
}
],
"rebaseLabel": "renovate/rebase",
"rebaseWhen": "behind-base-branch"
}
"extends": [
"local>volker.raschek/renovate-config:default#master",
"local>volker.raschek/renovate-config:container#master",
"local>volker.raschek/renovate-config:actions#master",
"local>volker.raschek/renovate-config:regexp#master"
]
}

View File

@@ -0,0 +1,25 @@
---
- name: "Create private DNSSEC: {{ bind9_dnssec_key.origin }}"
ansible.builtin.copy:
dest: "{{ item.private.filename }}"
content: "{{ item.private.content }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0600"
no_log: true
with_items:
- "{{ bind9_dnssec_key.key_signing_key }}"
- "{{ bind9_dnssec_key.zone_signing_key }}"
- name: "Create public DNSSEC: {{ bind9_dnssec_key.origin }}"
ansible.builtin.copy:
dest: "{{ item.public.filename }}"
content: "{{ item.public.content }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
no_log: true
with_items:
- "{{ bind9_dnssec_key.key_signing_key }}"
- "{{ bind9_dnssec_key.zone_signing_key }}"

132
tasks/main.yaml Normal file
View File

@@ -0,0 +1,132 @@
---
- name: Include OS-specific variables
ansible.builtin.include_vars: "{{ ansible_facts['os_family'] }}.yaml"
- name: Install bind and dependencies
ansible.builtin.package:
name: "{{ item }}"
state: present
with_items: "{{ bind_package_names }}"
- name: Create logging directory
ansible.builtin.file:
path: "{{ bind_log_directory }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0755"
state: directory
recurse: true
- name: Create config directory
ansible.builtin.file:
path: "{{ bind_config_directory }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0755"
state: directory
recurse: true
- name: Remove existing journal files
block:
- name: Find existing journal files
ansible.builtin.find:
path: "{{ bind_config_directory }}"
recurse: true
patterns: "*.jnl"
register: files_to_delete
- name: Delete existing journal files
ansible.builtin.file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
- name: Remove existing signed zone files
block:
- name: Find existing signed zone files
ansible.builtin.find:
path: "{{ bind_config_directory }}"
recurse: true
patterns: "*.signed"
register: files_to_delete
- name: Delete existing signed zone files
ansible.builtin.file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
- name: Remove existing DNSSEC key directory
block:
- name: Check if DNSSEC key directory exists
ansible.builtin.stat:
path: "{{ bind9_options.key_directory }}"
register: _stat_bind9_options_key_directory
- name: Remove DNSSEC key directory
ansible.builtin.file:
path: "{{ bind9_options.key_directory }}"
state: "absent"
when: _stat_bind9_options_key_directory.stat.exists
- name: Create DNSSEC key directory
ansible.builtin.file:
path: "{{ bind9_options.key_directory }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0700"
state: directory
- name: Create DNSSEC files
ansible.builtin.include_tasks: create_dnssec_files.yaml
with_items: "{{ bind9_dnssec_keys }}"
no_log: true
loop_control:
loop_var: bind9_dnssec_key
- name: Create DNS-Zone files
ansible.builtin.include_tasks: template_zone_files.yaml
with_items:
- "{{ bind9_views }}"
loop_control:
loop_var: view
- name: Create main configuration file
ansible.builtin.template:
src: "etc/named.conf.j2"
dest: "{{ bind_main_config }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
notify: Restart named
- name: Create excluded configuration files
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ item | replace('etc/named', bind_config_directory) }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
with_items:
- etc/named.conf
- etc/named/named.conf.acl
- etc/named/named.conf.logging
- etc/named/named.conf.options
- etc/named/named.conf.tsigkeys
- etc/named/named.conf.views
notify: Restart named
- name: Start and enabled named
ansible.builtin.systemd:
name: named
state: started
enabled: true
- name: Create rndc.key
ansible.builtin.template:
src: etc/rndc.key.j2
dest: /etc/rndc.key
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0600"
when: bind9_rndc_key.name | length > 0 and
bind9_rndc_key.algorithm | length > 0 and
bind9_rndc_key.secret | length > 0

View File

@@ -1,70 +0,0 @@
---
- name: include special distribution-dependent variables
include_vars: "{{ ansible_os_family }}.yml"
- name: install bind and dependencies
package:
name: "{{ item }}"
state: present
with_items: "{{ bind_package_names }}"
- name: create logging directory
file:
path: "{{ bind_log_directory }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: 0755
state: directory
recurse: yes
- name: remove existing journal files
block:
- name: find existing journal files
find:
path: "{{ bind_config_directory }}"
recurse: yes
patterns: "*.jnl"
register: files_to_delete
- name: delete existing journal files
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
# - name: copy zone files
# include_tasks: copy_zone_files.yml
# with_items:
# - "{{ bind9_views }}"
# loop_control:
# loop_var: view
- name: template zone files
include_tasks: template_zone_files.yml
with_items:
- "{{ bind9_views }}"
loop_control:
loop_var: view
- name: set up global bind config
template:
src: "{{ item }}.j2"
dest: "/etc/{{ item }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: 0644
with_items:
- named.conf
- named/named.conf.acl
- named/named.conf.logging
- named/named.conf.options
- named/named.conf.tsigkeys
- named/named.conf.views
notify: restart named
- name: start and enabled named
systemd:
name: named
state: started
enabled: yes

28
tasks/sign_zone_file.yaml Normal file
View File

@@ -0,0 +1,28 @@
---
- name: "Sign DNS Zone {{ zone.config.origin }}"
vars:
dnssec_cmd:
- dnssec-signzone
- -N
- INCREMENT
- -S
- -K
- "{{ bind9_options.key_directory }}"
block:
- name: "Extend dnssec command of ORIGIN"
ansible.builtin.set_fact:
_dnssec_cmd: "{{ dnssec_cmd + ['-o', zone.config.origin] }}"
- name: "Extend dnssec command of zone file"
ansible.builtin.set_fact:
_dnssec_cmd: "{{ _dnssec_cmd + [bind_config_directory + '/' + zone.file] }}"
- name: "Sign zone {{ zone.config.origin }}"
ansible.builtin.command:
argv: "{{ _dnssec_cmd }}"
creates: "{{ bind_config_directory + '/' + zone.file }}.signed"
- name: Adapt signed zone file permissions
ansible.builtin.file:
path: "{{ bind_config_directory + '/' + zone.file }}.signed"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"

View File

@@ -0,0 +1,48 @@
---
- name: "Create config directory of DNS zones"
ansible.builtin.file:
path: "{{ bind_config_directory }}/{{ zone.file | dirname }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0755"
state: directory
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.file is defined and
zone.file | length > 0
- name: "Template view {{ view.name }}"
ansible.builtin.template:
src: "{{ inventory_hostname }}/etc/named/{{ zone.file }}.j2"
dest: "{{ bind_config_directory + '/' + zone.file }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master'
notify: Restart named
- name: Check if last character in zone files is a newline
ansible.builtin.include_tasks: verify_zone_file.yaml
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master'
- name: Sign Zones
ansible.builtin.include_tasks: sign_zone_file.yaml
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master' and
bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key') | length > 0 and
(bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key'))[0].private | length > 0 and
(bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key'))[0].public | length > 0

View File

@@ -1,27 +0,0 @@
---
- name: create directory for zone {{ zone.file | dirname }}
file:
path: "{{ bind_config_directory }}/{{ zone.file | dirname }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: 0755
state: directory
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
- name: "template view {{ view.name }}"
template:
src: "{{ inventory_hostname }}/etc/named/{{ zone.file }}.j2"
dest: "{{ bind_config_directory }}/{{ zone.file }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: 0644
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.type == 'master'
notify: restart named

View File

@@ -0,0 +1,13 @@
---
- name: "Read the last character of DNS zone: {{ zone.config.origin }}"
ansible.builtin.command:
cmd: "tail --bytes 1 {{ bind_config_directory + '/' + zone.file }}"
register: _bind9_zone_last_character
changed_when: _bind9_zone_last_character.rc == 0
failed_when: _bind9_zone_last_character.rc > 0
- name: "Fail when the last character of DNS zone file is not a newline: {{ bind_config_directory + '/' + zone.file }}"
ansible.builtin.fail:
msg: "Last character of DNS zone file is not a newline: {{ bind_config_directory + '/' + zone.file }}"
when: _bind9_zone_last_character.stdout != ''

View File

@@ -0,0 +1,14 @@
#
# {{ ansible_managed }}
#
# zone "." IN {
# type hint;
# file "named.ca";
# };
include "{{ bind_config_directory }}/named.conf.acl";
include "{{ bind_config_directory }}/named.conf.logging";
include "{{ bind_config_directory }}/named.conf.options";
include "{{ bind_config_directory }}/named.conf.tsigkeys";
include "{{ bind_config_directory }}/named.conf.views";

View File

@@ -2,6 +2,23 @@
# {{ ansible_managed }}
#
{% if bind9_controls is defined and bind9_controls | length > 0 %}
controls {
{% for control in bind9_controls %}
inet {{ control.inet }} port {{ control.port }} allow {
{% for acl in control.acls %}
{{ acl }};
{% endfor %}
} keys {
{% for name in control.tsig_keys %}
"{{ name }}";
{% endfor %}
};
{% endfor %}
};
{% endif %}
options {
# This specifies which hosts are allowed to ask ordinary DNS questions.
@@ -167,16 +184,35 @@ options {
# allow-update-forwarding {};
{% endif %}
directory "/etc/named";
directory "{{ bind_config_directory }}";
dnssec-validation {{ bind9_options.dnssec_validation | default('no') }};
# This accepts expired signatures when verifying DNSSEC signatures. The default is no. Setting this option to yes
# leaves named vulnerable to replay attacks.
dnssec-accept-expired {{ "yes" if bind9_options.dnssec_accept_expired else "no" }};
# dump-file "/var/bind/named.dump";
# Enables DNSSEC validation in named.
#
# auto: If set to auto, DNSSEC validation is enabled and a default trust anchor for the DNS root zone is used. This
# trust anchor is provided as part of BIND and is kept up-to-date
#
# yes: If set to yes, DNSSEC validation is enabled, but a trust anchor must be manually configured using a
# trust-anchors statement (or the managed-keys or trusted-keys statements, both deprecated). If trust-anchors is not
# configured, it is a configuration error. If trust-anchors does not include a valid root key, then validation does
# not take place for names which are not covered by any of the configured trust anchors.
#
# no: If set to no, DNSSEC validation is disabled.
#
# https://bind9.readthedocs.io/en/latest/reference.html#namedconf-statement-dnssec-validation
dnssec-validation {{ bind9_options.dnssec_validation | default('auto') }};
{% if bind9_options.forwarders is defined and bind9_options.forwarders | length > 0 %}
forwarders {
{% for forwarder in bind9_options.forwarders %}
{{ forwarder }};
{% if forwarder.port is defined and forwarder.port | length > 0 %}
{{ forwarder.ip }} port {{ forwarder.port }};
{% else %}
{{ forwarder.ip }};
{% endif %}
{% endfor %}
};
{% else %}
@@ -210,6 +246,13 @@ options {
};
{% endif %}
# Indicates the directory where public and private DNSSEC key files are found.
#
# This is the directory where the public and private DNSSEC key files should be found when performing a dynamic update
# of secure zones, if different than the current working directory.
# https://bind9.readthedocs.io/en/latest/reference.html#namedconf-statement-key-directory
key-directory "{{ bind9_options.key_directory }}";
# managed-keys-directory "/var/named/dynamic";
# memstatistics-file "/var/bind/named.memstats";
minimal-responses {{ bind9_options.minimal_responses }};
@@ -230,4 +273,16 @@ options {
version none;
zone-statistics yes;
};
};
{% if bind9_statics.enabled is defined and bind9_statics.enabled is true %}
statistics-channels {
{% for channel in bind9_statics.channels %}
inet {{ channel.inet }} port {{ channel.port }} allow {
{% for acl in channel.acls %}
{{ acl }};
{% endfor %}
};
{% endfor %}
};
{% endif %}

View File

@@ -1,3 +1,4 @@
#jinja2: lstrip_blocks: True
#
# {{ ansible_managed }}
#
@@ -12,7 +13,7 @@ view "{{ view.name }}" {
};
{% for zone in view.zones %}
zone "{{ zone.origin }}" {
zone "{{ zone.config.origin }}" {
# Hosts which are allowed to issue queries to the server. If not specified all
# hosts are allowed to make queries (defaults to allow-query {any;};
@@ -20,9 +21,9 @@ view "{{ view.name }}" {
# NOTE:
# - The statements may be used in a zone, view or a global options
# clause.
{% if zone.allow_query is defined and zone.allow_query | length > 0 %}
{% if zone.config.allow_query is defined and zone.config.allow_query | length > 0 %}
allow-query {
{% for entry in zone.allow_query %}
{% for entry in zone.config.allow_query %}
{{ entry }};
{% endfor %}
};
@@ -39,9 +40,9 @@ view "{{ view.name }}" {
# NOTE:
# - The statements may be used in a zone, view or a global options
# clause.
{% if zone.allow_query_on is defined and zone.allow_query_on | length > 0 %}
{% if zone.config.allow_query_on is defined and zone.config.allow_query_on | length > 0 %}
allow-query {
{% for entry in zone.allow_query_on %}
{% for entry in zone.config.allow_query_on %}
{{ entry }};
{% endfor %}
};
@@ -62,9 +63,9 @@ view "{{ view.name }}" {
#
# NOTE:
# - This statement may be used in a zone, view or global options clause.
{% if zone.allow_transfer is defined and zone.allow_transfer | length > 0 %}
{% if zone.config.allow_transfer is defined and zone.config.allow_transfer | length > 0 %}
allow-transfer {
{% for entry in zone.allow_transfer %}
{% for entry in zone.config.allow_transfer %}
key {{ entry }};
{% endfor %}
};
@@ -85,9 +86,9 @@ view "{{ view.name }}" {
#
# NOTE:
# - This statement may be used in a zone, view or an options clause.
{% if zone.allow_update is defined and zone.allow_update | length > 0 %}
{% if zone.config.allow_update is defined and zone.config.allow_update | length > 0 %}
allow-update {
{% for entry in zone.allow_update %}
{% for entry in zone.config.allow_update %}
key {{ entry }};
{% endfor %}
};
@@ -101,9 +102,9 @@ view "{{ view.name }}" {
#
# NOTE:
# - This statement may be used in zone, view or an options clause.
{% if zone.allow_update_forwarding is defined and zone.allow_update_forwarding | length > 0 %}
{% if zone.config.allow_update_forwarding is defined and zone.config.allow_update_forwarding | length > 0 %}
allow-update-forwarding {
{% for entry in zone.allow_update_forwarding %}
{% for entry in zone.config.allow_update_forwarding %}
{{ entry }};
{% endfor %}
};
@@ -127,13 +128,45 @@ view "{{ view.name }}" {
# is complete. If the Master is not available or the Slave fails to
# contact the Master, ffor whatever reason, the zone may be left with
# no effective Authoritative Name Servers.
file "/etc/named/{{ zone.file }}";
{% if zone.file is defined and zone.file | length > 0 and not zone.file.startswith('/') %}
file "{{ bind_config_directory }}/{{ zone.config.file }}";
{% elif zone.file is defined and zone.file | length > 0 and zone.file.startswith('/')%}
file "{{ zone.config.file }}";
{% else %}
# file "{{ bind_config_directory }}/...";
{% endif %}
# This option is only meaningful if the forwarders list is not empty. A
# value of first is the default and causes the server to query the
# forwarders first; if that does not answer the question, the server then
# looks for the answer itself. If only is specified, the server only queries
# the forwarders.
{% if zone.config.forward is defined and zone.config.forward | length > 0 %}
forward {{ zone.config.forward }};
{% else %}
# forward first;
{% endif %}
# This specifies a list of IP addresses to which queries are forwarded. The
# default is the empty list (no forwarding). Each address in the list can be
# associated with an optional port number and/or DSCP value, and a default
# port number and DSCP value can be set for the entire list.
# https://bind9.readthedocs.io/en/latest/reference.html#forwarding
{% if zone.config.forwarders is defined and zone.config.forwarders | length > 0 %}
forwarders {
{% for forwarder in zone.config.forwarders %}
{{ forwarder }};
{% endfor %}
};
{% else %}
# forwarders {};
{% endif %}
# master servers
# https://bind9.readthedocs.io/en/latest/manpages.html?highlight=masters#masters
{% if zone.masters is defined and zone.masters | length > 0 %}
{% if zone.config.masters is defined and zone.config.masters | length > 0 %}
masters {
{% for master in zone.masters %}
{% for master in zone.config.masters %}
{{ master.ip }} key {{ master.tsigkey}};
{% endfor %}
};
@@ -157,7 +190,14 @@ view "{{ view.name }}" {
# NOTE:
# - This statement may be specified in zone, view clauses or in a
# global options clause.
{% if zone.config.notify is defined and zone.config.notify %}
notify yes;
{% elif zone.config.notify is defined and not zone.config.notify %}
notify no;
{% else %}
# notify yes | no;
{% endif %}
# Zones configured for dynamic DNS may use this option to set the
# update method to be used for the zone serial number in the SOA
@@ -176,15 +216,32 @@ view "{{ view.name }}" {
# is the current date in the form “YYYYMMDD”, followed by two
# zeroes, unless the existing serial number is already greater than
# or equal to that value, in which case it is incremented by one.
{% if zone.serial_update_method is defined %}
serial-update-method {{ zone.serial_update_method }};
{% if zone.config.serial_update_method is defined %}
serial-update-method {{ zone.config.serial_update_method }};
{% else %}
# serial-update-method [date | increment | unixtime ];
{% endif %}
type {{ zone.type }};
type {{ zone.config.type }};
# The update-policy clause allows more fine-grained control over which
# updates are allowed. It specifies a set of rules, in which each rule
# either grants or denies permission for one or more names in the zone to be
# updated by one or more identities. Identity is determined by the key that
# signed the update request, using either TSIG or SIG(0).
# https://bind9.readthedocs.io/en/v9_16_5/reference.html#dynamic-update-policies
{% if zone.config.update_policies is defined and zone.config.update_policies | length > 0 %}
update-policy {
{% for update_policy in zone.config.update_policies %}
{{ update_policy.action }} {{ update_policy.identity }} {{ update_policy.ruletype }} {{ update_policy.name | default('') }} {{ update_policy.types | default('') | join(' ') }};
{% endfor %}
};
{% else %}
# update-policy {};
{% endif %}
};
{% endfor %}
};

View File

@@ -0,0 +1,7 @@
#
# {{ ansible_managed }}
#
key "{{ bind9_rndc_key.name }}" {
algorithm {{ bind9_rndc_key.algorithm }};
secret "{{ bind9_rndc_key.secret }}";
};

View File

@@ -1,12 +0,0 @@
# zone "." IN {
# type hint;
# file "named.ca";
# };
include "/etc/named/named.conf.acl";
include "/etc/named/named.conf.logging";
include "/etc/named/named.conf.options";
include "/etc/named/named.conf.tsigkeys";
include "/etc/named/named.conf.views";
# include "/etc/named.rfc1912.zones";
# include "/etc/named.root.key";

View File

@@ -1,8 +1,8 @@
---
bind_main_config: /etc/named.conf
bind_config_directory: /etc/named
bind_log_directory: /var/log/named
bind_main_config: /etc/bind/named.conf
bind_config_directory: /etc/bind
bind_log_directory: /var/log/bind
bind_package_names:
- bind9
@@ -10,4 +10,4 @@ bind_package_names:
bind_service_name: named
bind_unix_user: bind
bind_unix_group: bind
bind_unix_group: bind

View File

@@ -11,4 +11,4 @@ bind_package_names:
bind_service_name: named
bind_unix_user: named
bind_unix_group: named
bind_unix_group: named