Compare commits
20 Commits
fa35922646
...
origin/mai
| Author | SHA1 | Date | |
|---|---|---|---|
| 57d8f88679 | |||
|
|
0271be7752 | ||
|
|
907735c294 | ||
|
|
cdcc4cbbda | ||
|
|
30918dc9f7 | ||
|
|
7388e4eaaf | ||
|
|
f6eee76e05 | ||
| 0fede04e19 | |||
|
|
5f4bb3ccda | ||
|
|
4cb9cb3e3f | ||
|
|
45d9861960 | ||
|
|
28f8ca5c12 | ||
|
|
17a9918685 | ||
|
|
ca70afbd51 | ||
|
|
68a7b62305 | ||
|
|
dae9cb60f5 | ||
|
|
d075e3ec17 | ||
|
|
e8f84fce0b | ||
|
|
3d2919721b | ||
|
|
112ba5f7ca |
63
.gitea/workflows/test.yaml
Normal file
63
.gitea/workflows/test.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on: # noqa: yaml[truthy]
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- feature/**
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
run: |
|
||||||
|
pip install --no-cache-dir yamllint ansible-lint
|
||||||
|
|
||||||
|
- name: Run yamllint
|
||||||
|
run: yamllint -d relaxed .
|
||||||
|
|
||||||
|
- name: Run ansible-lint
|
||||||
|
run: ansible-lint --strict --profile=production
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: lint
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install podman
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y podman
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install --no-cache-dir \
|
||||||
|
ansible \
|
||||||
|
molecule[podman] \
|
||||||
|
podman-compose \
|
||||||
|
pyyaml \
|
||||||
|
jinja2
|
||||||
|
|
||||||
|
- name: Run Molecule tests
|
||||||
|
run: molecule test
|
||||||
@@ -458,6 +458,7 @@ options:
|
|||||||
- <address>
|
- <address>
|
||||||
- address: <address>
|
- address: <address>
|
||||||
port: <port>
|
port: <port>
|
||||||
|
tls: <tls_name>
|
||||||
|
|
||||||
# DNSSEC
|
# DNSSEC
|
||||||
dnssec_enable: <bool> # DEPRECATED in 9.15+
|
dnssec_enable: <bool> # DEPRECATED in 9.15+
|
||||||
@@ -540,6 +541,19 @@ options:
|
|||||||
# Logging
|
# Logging
|
||||||
querylog: <bool>
|
querylog: <bool>
|
||||||
|
|
||||||
|
# DNSTAP - DNS traffic capture
|
||||||
|
dnstap: # List of message types to capture
|
||||||
|
- type: <auth|client|forwarder|resolver> # Message type (required)
|
||||||
|
log: <query|response> # Optional: specific direction
|
||||||
|
dnstap_output: # Output destination (required if dnstap is set)
|
||||||
|
output_type: <file|unix> # Output type: file or unix socket (required)
|
||||||
|
output_file: <path> # File path or socket path (required)
|
||||||
|
size: <size> # Optional: Max file size before rotation
|
||||||
|
versions: <integer> # Optional: Number of versions to keep
|
||||||
|
suffix: <increment|timestamp> # Optional: Rotation suffix type
|
||||||
|
dnstap_identity: <string> # Optional: Identity string (defaults to hostname)
|
||||||
|
dnstap_version: <string> # Optional: Version string (defaults to BIND version)
|
||||||
|
|
||||||
# Zone management
|
# Zone management
|
||||||
check_names: <master|slave|response> <warn|fail|ignore>
|
check_names: <master|slave|response> <warn|fail|ignore>
|
||||||
check_dup_records: <warn|fail|ignore>
|
check_dup_records: <warn|fail|ignore>
|
||||||
@@ -593,7 +607,8 @@ options:
|
|||||||
|
|
||||||
forwarders:
|
forwarders:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 8.8.8.8
|
- address: 8.8.8.8
|
||||||
|
tls: dot-tls
|
||||||
|
|
||||||
dnssec_validation: auto
|
dnssec_validation: auto
|
||||||
|
|
||||||
@@ -917,6 +932,7 @@ zones:
|
|||||||
- <address>
|
- <address>
|
||||||
- address: <address>
|
- address: <address>
|
||||||
port: <port>
|
port: <port>
|
||||||
|
tls: <tls_name>
|
||||||
|
|
||||||
# DNSSEC
|
# DNSSEC
|
||||||
dnssec_policy: <policy_name> # DNSSEC policy to use
|
dnssec_policy: <policy_name> # DNSSEC policy to use
|
||||||
@@ -1017,7 +1033,8 @@ zones:
|
|||||||
forward: only
|
forward: only
|
||||||
forwarders:
|
forwarders:
|
||||||
- 10.0.0.1
|
- 10.0.0.1
|
||||||
- 10.0.0.2
|
- address: 10.0.0.2
|
||||||
|
tls: internal-tls
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -1079,9 +1096,9 @@ addresses:
|
|||||||
- 10.0.0.0/8
|
- 10.0.0.0/8
|
||||||
```
|
```
|
||||||
|
|
||||||
### Address with Port/DSCP
|
### Address with Port/TLS
|
||||||
|
|
||||||
For options accepting `address [port X] [dscp Y]`:
|
For options accepting `address [port X] [tls Y]` (e.g., `forwarders`):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Simple list
|
# Simple list
|
||||||
@@ -1089,27 +1106,28 @@ forwarders:
|
|||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
|
|
||||||
# With source port/dscp
|
# With global port/tls
|
||||||
forwarders:
|
forwarders:
|
||||||
port: 5353
|
port: 853
|
||||||
dscp: 46
|
tls: dot-tls
|
||||||
addresses:
|
addresses:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
|
|
||||||
# Per-address port/dscp
|
# Per-address port/tls
|
||||||
forwarders:
|
forwarders:
|
||||||
- address: 1.1.1.1
|
- address: 1.1.1.1
|
||||||
port: 53
|
port: 53
|
||||||
- address: 8.8.8.8
|
- address: 8.8.8.8
|
||||||
port: 5353
|
port: 853
|
||||||
dscp: 46
|
tls: cloudflare-tls
|
||||||
|
|
||||||
# Mixed format
|
# Mixed format
|
||||||
forwarders:
|
forwarders:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- address: 8.8.8.8
|
- address: 8.8.8.8
|
||||||
port: 5353
|
port: 853
|
||||||
|
tls: dot-tls
|
||||||
```
|
```
|
||||||
|
|
||||||
### Address with Key/TLS
|
### Address with Key/TLS
|
||||||
|
|||||||
29
README.md
29
README.md
@@ -126,38 +126,43 @@ Simple options are defined just as that.
|
|||||||
```
|
```
|
||||||
|
|
||||||
Some options have several optional parameters. For those, a somewhat flexible
|
Some options have several optional parameters. For those, a somewhat flexible
|
||||||
configuration format has been created
|
configuration format has been created. Common patterns include:
|
||||||
|
|
||||||
|
- **Address with Port/DSCP**: Used by options like `primaries`, `parental_agents` (e.g., `address [ port <port> ] [ dscp <dscp> ]`)
|
||||||
|
- **Address with Port/TLS**: Used by options like `forwarders` (e.g., `address [ port <port> ] [ tls <tls> ]`)
|
||||||
|
|
||||||
```
|
```
|
||||||
IP_PORT_DSCP_OPTION: # Any option that is defined as one of:
|
ADDRESS_PORT_TLS_OPTION: # Example: forwarders option
|
||||||
# <option> [ port <port> ] [ dscp <dscp> ] { <address> [ port <port> ] [ dscp <dscp> ]; ... }
|
# <option> [ port <port> ] [ tls <tls> ] { <address> [ port <port> ] [ tls <tls> ]; ... }
|
||||||
# <option> [ port <port> ] [ dscp <dscp> ] { <address> [ port <port> ] [ key <key> ] [ tls <tls> ]; ... }
|
|
||||||
# has a few optional syntaxes
|
# has a few optional syntaxes
|
||||||
# Example 1: Simple address list
|
# Example 1: Simple address list
|
||||||
- ADDRESS1
|
- ADDRESS1
|
||||||
- ADDRESS2
|
- ADDRESS2
|
||||||
# Example 2: To define source port/dscp, use 'addresses' sub-element
|
# Example 2: To define global port/tls, use 'addresses' sub-element
|
||||||
[ port: PORT ]
|
[ port: PORT ]
|
||||||
[ dscp: DSCP ]
|
[ tls: TLS_NAME ]
|
||||||
addresses:
|
addresses:
|
||||||
- ADDRESS1
|
- ADDRESS1
|
||||||
- ADDRESS2
|
- ADDRESS2
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
# Example 3: To define target port/dscp, use 'addresses' as a list of dicts
|
# Example 3: To define per-address port/tls, use 'addresses' as a list of dicts
|
||||||
addresses:
|
addresses:
|
||||||
- address: ADDRESS
|
- address: ADDRESS
|
||||||
[ port: PORT ]
|
[ port: PORT ]
|
||||||
[ dscp: DSCP ]
|
[ tls: TLS_NAME ]
|
||||||
- address: 127.0.0.1
|
- address: 127.0.0.1
|
||||||
port: 53
|
port: 53
|
||||||
- address: 127.0.0.1
|
- address: 127.0.0.1
|
||||||
dscp: 42
|
port: 853
|
||||||
- address: 127.0.0.1
|
tls: dot-tls
|
||||||
port: 5353
|
- address: 8.8.8.8
|
||||||
dscp: 42
|
port: 853
|
||||||
|
tls: google-tls
|
||||||
# Example 4: The various formats can be mixed and matched within the main element
|
# Example 4: The various formats can be mixed and matched within the main element
|
||||||
- ADDRESS1
|
- ADDRESS1
|
||||||
- address: ADDRESS2
|
- address: ADDRESS2
|
||||||
port: PORT
|
port: PORT
|
||||||
|
tls: TLS_NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
19
bind9-grammar/forward.zoneopt.json
Normal file
19
bind9-grammar/forward.zoneopt.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "forward"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
bind9-grammar/hint.zoneopt.json
Normal file
19
bind9-grammar/hint.zoneopt.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "hint"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
bind9-grammar/in-view.zoneopt.json
Normal file
10
bind9-grammar/in-view.zoneopt.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"in-view": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
171
bind9-grammar/mirror.zoneopt.json
Normal file
171
bind9-grammar/mirror.zoneopt.json
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "mirror"
|
||||||
|
},
|
||||||
|
"allow-notify": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-transfer": {
|
||||||
|
"_grammar": "[ port <integer> ] [ transport <string> ] { <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-update-forwarding": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"also-notify": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"ixfr-from-differences": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"journal": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-ixfr-ratio": {
|
||||||
|
"_grammar": "( unlimited | <percentage> )"
|
||||||
|
},
|
||||||
|
"max-journal-size": {
|
||||||
|
"_grammar": "( default | unlimited | <sizeval> )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-transfer-rate-in": {
|
||||||
|
"_grammar": "<integer> <integer>"
|
||||||
|
},
|
||||||
|
"multi-master": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "( explicit | master-only | primary-only | <boolean> )"
|
||||||
|
},
|
||||||
|
"notify-cfg": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_id": "<string>",
|
||||||
|
"_mapbody": {
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"plugin": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_grammar": "( query ) <string> [ { <unspecified-text> } ]"
|
||||||
|
},
|
||||||
|
"primaries": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"provide-zoneversion": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-expire": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-ixfr": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-ixfr-max-diffs": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"transfer-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"transfer-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"try-tcp-refresh": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"zero-no-soa-ttl": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2315
bind9-grammar/options.json
Normal file
2315
bind9-grammar/options.json
Normal file
File diff suppressed because it is too large
Load Diff
258
bind9-grammar/primary.zoneopt.json
Normal file
258
bind9-grammar/primary.zoneopt.json
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "primary"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-transfer": {
|
||||||
|
"_grammar": "[ port <integer> ] [ transport <string> ] { <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-update": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"also-notify": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"check-dup-records": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-integrity": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"check-mx": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-mx-cname": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-sibling": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"check-spf": {
|
||||||
|
"_grammar": "( warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-srv-cname": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"check-svcb": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"check-wildcard": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"checkds": {
|
||||||
|
"_grammar": "( explicit | <boolean> )"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dlz": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dnskey-sig-validity": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"dnssec-dnskey-kskonly": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"dnssec-loadkeys-interval": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"dnssec-policy": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dnssec-secure-to-insecure": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"dnssec-update-mode": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "( maintain | no-resign )"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"initial-file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"inline-signing": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"ixfr-from-differences": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"journal": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"key-directory": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"log-report-channel": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-ixfr-ratio": {
|
||||||
|
"_grammar": "( unlimited | <percentage> )"
|
||||||
|
},
|
||||||
|
"max-journal-size": {
|
||||||
|
"_grammar": "( default | unlimited | <sizeval> )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-zone-ttl": {
|
||||||
|
"_flags": [
|
||||||
|
"deprecated"
|
||||||
|
],
|
||||||
|
"_grammar": "( unlimited | <duration> )"
|
||||||
|
},
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "( explicit | master-only | primary-only | <boolean> )"
|
||||||
|
},
|
||||||
|
"notify-cfg": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_id": "<string>",
|
||||||
|
"_mapbody": {
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-to-soa": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"nsec3-test-zone": {
|
||||||
|
"_flags": [
|
||||||
|
"test only"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"parental-agents": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"parental-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"parental-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"plugin": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_grammar": "( query ) <string> [ { <unspecified-text> } ]"
|
||||||
|
},
|
||||||
|
"provide-zoneversion": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"send-report-channel": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"serial-update-method": {
|
||||||
|
"_grammar": "( date | increment | unixtime )"
|
||||||
|
},
|
||||||
|
"sig-signing-nodes": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-signing-signatures": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-signing-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-validity-interval": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<integer> [ <integer> ]"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"update-check-ksk": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"update-policy": {
|
||||||
|
"_grammar": "( local | { ( deny | grant ) <string> ( 6to4-self | external | krb5-self | krb5-selfsub | krb5-subdomain | krb5-subdomain-self-rhs | ms-self | ms-selfsub | ms-subdomain | ms-subdomain-self-rhs | name | self | selfsub | selfwild | subdomain | tcp-self | wildcard | zonesub ) [ <string> ] <rrtypelist>; ... } )"
|
||||||
|
},
|
||||||
|
"zero-no-soa-ttl": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
58
bind9-grammar/redirect.zoneopt.json
Normal file
58
bind9-grammar/redirect.zoneopt.json
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "redirect"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"dlz": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-zone-ttl": {
|
||||||
|
"_flags": [
|
||||||
|
"deprecated"
|
||||||
|
],
|
||||||
|
"_grammar": "( unlimited | <duration> )"
|
||||||
|
},
|
||||||
|
"plugin": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_grammar": "( query ) <string> [ { <unspecified-text> } ]"
|
||||||
|
},
|
||||||
|
"primaries": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
258
bind9-grammar/secondary.zoneopt.json
Normal file
258
bind9-grammar/secondary.zoneopt.json
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "secondary"
|
||||||
|
},
|
||||||
|
"allow-notify": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-transfer": {
|
||||||
|
"_grammar": "[ port <integer> ] [ transport <string> ] { <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-update-forwarding": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"also-notify": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"checkds": {
|
||||||
|
"_grammar": "( explicit | <boolean> )"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dlz": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dnskey-sig-validity": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"dnssec-dnskey-kskonly": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"dnssec-loadkeys-interval": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"dnssec-policy": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"dnssec-update-mode": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "( maintain | no-resign )"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"inline-signing": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"ixfr-from-differences": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"journal": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"key-directory": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"log-report-channel": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-ixfr-ratio": {
|
||||||
|
"_grammar": "( unlimited | <percentage> )"
|
||||||
|
},
|
||||||
|
"max-journal-size": {
|
||||||
|
"_grammar": "( default | unlimited | <sizeval> )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-out": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-transfer-rate-in": {
|
||||||
|
"_grammar": "<integer> <integer>"
|
||||||
|
},
|
||||||
|
"multi-master": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "( explicit | master-only | primary-only | <boolean> )"
|
||||||
|
},
|
||||||
|
"notify-cfg": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_id": "<string>",
|
||||||
|
"_mapbody": {
|
||||||
|
"notify": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notify-defer": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-delay": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"notify-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"notify-to-soa": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"nsec3-test-zone": {
|
||||||
|
"_flags": [
|
||||||
|
"test only"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"parental-agents": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"parental-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"parental-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"plugin": {
|
||||||
|
"_flags": [
|
||||||
|
"may occur multiple times"
|
||||||
|
],
|
||||||
|
"_grammar": "( query ) <string> [ { <unspecified-text> } ]"
|
||||||
|
},
|
||||||
|
"primaries": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"provide-zoneversion": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-expire": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-ixfr": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"request-ixfr-max-diffs": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"send-report-channel": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"sig-signing-nodes": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-signing-signatures": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-signing-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"sig-validity-interval": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<integer> [ <integer> ]"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"transfer-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"transfer-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"try-tcp-refresh": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"update-check-ksk": {
|
||||||
|
"_flags": [
|
||||||
|
"obsolete"
|
||||||
|
],
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"zero-no-soa-ttl": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
43
bind9-grammar/static-stub.zoneopt.json
Normal file
43
bind9-grammar/static-stub.zoneopt.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "static-stub"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"server-addresses": {
|
||||||
|
"_grammar": "{ ( <ipv4_address> | <ipv6_address> ); ... }"
|
||||||
|
},
|
||||||
|
"server-names": {
|
||||||
|
"_grammar": "{ <string>; ... }"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
85
bind9-grammar/stub.zoneopt.json
Normal file
85
bind9-grammar/stub.zoneopt.json
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "stub"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-transfer-rate-in": {
|
||||||
|
"_grammar": "<integer> <integer>"
|
||||||
|
},
|
||||||
|
"multi-master": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"primaries": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"transfer-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"transfer-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
85
bind9-grammar/zoneopt.json
Normal file
85
bind9-grammar/zoneopt.json
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"zone": {
|
||||||
|
"_id": "<string> [ <class> ]",
|
||||||
|
"_mapbody": {
|
||||||
|
"type": {
|
||||||
|
"_grammar": "stub"
|
||||||
|
},
|
||||||
|
"allow-query": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"allow-query-on": {
|
||||||
|
"_grammar": "{ <address_match_element>; ... }"
|
||||||
|
},
|
||||||
|
"check-names": {
|
||||||
|
"_grammar": "( fail | warn | ignore )"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"file": {
|
||||||
|
"_grammar": "<quoted_string>"
|
||||||
|
},
|
||||||
|
"forward": {
|
||||||
|
"_grammar": "( first | only )"
|
||||||
|
},
|
||||||
|
"forwarders": {
|
||||||
|
"_grammar": "[ port <integer> ] [ tls <string> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"masterfile-format": {
|
||||||
|
"_grammar": "( raw | text )"
|
||||||
|
},
|
||||||
|
"masterfile-style": {
|
||||||
|
"_grammar": "( full | relative )"
|
||||||
|
},
|
||||||
|
"max-records": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-records-per-type": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-idle-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-transfer-time-in": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"max-types-per-name": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-refresh-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-retry-time": {
|
||||||
|
"_grammar": "<integer>"
|
||||||
|
},
|
||||||
|
"min-transfer-rate-in": {
|
||||||
|
"_grammar": "<integer> <integer>"
|
||||||
|
},
|
||||||
|
"multi-master": {
|
||||||
|
"_grammar": "<boolean>"
|
||||||
|
},
|
||||||
|
"primaries": {
|
||||||
|
"_grammar": "[ port <integer> ] [ source ( <ipv4_address> | * ) ] [ source-v6 ( <ipv6_address> | * ) ] { ( <server-list> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }"
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"_grammar": "<string>"
|
||||||
|
},
|
||||||
|
"transfer-source": {
|
||||||
|
"_grammar": "( <ipv4_address> | * )"
|
||||||
|
},
|
||||||
|
"transfer-source-v6": {
|
||||||
|
"_grammar": "( <ipv6_address> | * )"
|
||||||
|
},
|
||||||
|
"zone-statistics": {
|
||||||
|
"_grammar": "( full | terse | none | <boolean> )"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,6 @@ bind9_config_indent: 4
|
|||||||
bind9_group_config: []
|
bind9_group_config: []
|
||||||
bind9_site_config: []
|
bind9_site_config: []
|
||||||
bind9_host_config: []
|
bind9_host_config: []
|
||||||
|
|
||||||
bind9_default_config:
|
bind9_default_config:
|
||||||
- name: named.conf
|
- name: named.conf
|
||||||
backup: false
|
backup: false
|
||||||
@@ -28,10 +27,11 @@ bind9_default_config:
|
|||||||
options:
|
options:
|
||||||
directory: "{{ bind9_working_directory }}"
|
directory: "{{ bind9_working_directory }}"
|
||||||
|
|
||||||
bind9_config: "{{ [bind9_default_config,
|
bind9_config: >-
|
||||||
bind9_group_config,
|
{{
|
||||||
bind9_site_config,
|
[bind9_default_config,
|
||||||
bind9_host_config] |
|
bind9_group_config,
|
||||||
community.general.lists_mergeby('name',
|
bind9_site_config,
|
||||||
recursive=true,
|
bind9_host_config] |
|
||||||
list_merge='append_rp') }}"
|
community.general.lists_mergeby('name', recursive=true, list_merge='append_rp')
|
||||||
|
}}
|
||||||
|
|||||||
@@ -16,10 +16,8 @@
|
|||||||
- "{{ bind9_cfgdir }}"
|
- "{{ bind9_cfgdir }}"
|
||||||
- "{{ bind9_working_directory }}"
|
- "{{ bind9_working_directory }}"
|
||||||
- "{{ bind9_libdir }}"
|
- "{{ bind9_libdir }}"
|
||||||
dest: "{{
|
dest: "{{ bind9_backup_dir + '/bind9-config-' + ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
|
||||||
bind9_backup_dir + '/bind9-config-' +
|
|
||||||
ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
|
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
when: bind9_backup_config is defined and bind9_backup_config
|
when: bind9_backup_config is defined and bind9_backup_config
|
||||||
|
|||||||
@@ -4,4 +4,3 @@ collections:
|
|||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
- name: community.crypto
|
- name: community.crypto
|
||||||
- name: community.general
|
- name: community.general
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,114 @@
|
|||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Create log directory for BIND
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /var/log/named
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
owner: bind
|
||||||
|
group: bind
|
||||||
|
|
||||||
- name: Include bind9 role
|
- name: Include bind9 role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: ../../../ansible-bind9-role
|
name: ../../../ansible-bind9-role # noqa: role-name[path]
|
||||||
|
vars:
|
||||||
|
bind9_backup_config: false
|
||||||
|
bind9_host_config:
|
||||||
|
- name: named.conf.options
|
||||||
|
options:
|
||||||
|
directory: "{{ bind9_working_directory }}"
|
||||||
|
recursion: true
|
||||||
|
allow_query:
|
||||||
|
- any
|
||||||
|
allow_recursion:
|
||||||
|
- 10.0.0.0/8
|
||||||
|
- 192.168.0.0/16
|
||||||
|
- 172.16.0.0/12
|
||||||
|
- localhost
|
||||||
|
- localnets
|
||||||
|
forwarders:
|
||||||
|
- address: 91.239.100.100
|
||||||
|
tls: censurfridns-anycast
|
||||||
|
- address: 89.233.43.71
|
||||||
|
tls: censurfridns-unicast
|
||||||
|
forward: first
|
||||||
|
dnssec_validation: auto
|
||||||
|
dnstap:
|
||||||
|
- type: auth
|
||||||
|
- type: resolver
|
||||||
|
log: query
|
||||||
|
- type: client
|
||||||
|
log: response
|
||||||
|
dnstap_output:
|
||||||
|
output_type: file
|
||||||
|
output_file: /var/log/named/dnstap.log
|
||||||
|
size: 20m
|
||||||
|
versions: 3
|
||||||
|
suffix: increment
|
||||||
|
dnstap_identity: dns-server-01
|
||||||
|
dnstap_version: 9.18
|
||||||
|
logging:
|
||||||
|
channels:
|
||||||
|
- name: default_log
|
||||||
|
file:
|
||||||
|
name: /var/log/named/default.log
|
||||||
|
severity: info
|
||||||
|
print_time: true
|
||||||
|
print_severity: true
|
||||||
|
print_category: true
|
||||||
|
- name: security_log
|
||||||
|
file:
|
||||||
|
name: /var/log/named/security.log
|
||||||
|
severity: dynamic
|
||||||
|
print_time: true
|
||||||
|
print_severity: true
|
||||||
|
print_category: true
|
||||||
|
- name: query_log
|
||||||
|
file:
|
||||||
|
name: /var/log/named/queries.log
|
||||||
|
versions: 5
|
||||||
|
size: 10m
|
||||||
|
severity: info
|
||||||
|
print_time: true
|
||||||
|
- name: dnssec_log
|
||||||
|
file:
|
||||||
|
name: /var/log/named/dnssec.log
|
||||||
|
severity: debug
|
||||||
|
print_time: true
|
||||||
|
print_severity: true
|
||||||
|
- name: rate_limit_log
|
||||||
|
syslog: daemon
|
||||||
|
severity: warning
|
||||||
|
categories:
|
||||||
|
- name: default
|
||||||
|
channels:
|
||||||
|
- default_log
|
||||||
|
- name: general
|
||||||
|
channels:
|
||||||
|
- default_log
|
||||||
|
- name: security
|
||||||
|
channels:
|
||||||
|
- security_log
|
||||||
|
- name: queries
|
||||||
|
channels:
|
||||||
|
- query_log
|
||||||
|
- name: dnssec
|
||||||
|
channels:
|
||||||
|
- dnssec_log
|
||||||
|
- name: rate-limit
|
||||||
|
channels:
|
||||||
|
- rate_limit_log
|
||||||
|
- name: named.conf.local
|
||||||
|
tls:
|
||||||
|
- name: censurfridns-anycast
|
||||||
|
remote_hostname: anycast.uncensoreddns.org
|
||||||
|
- name: censurfridns-unicast
|
||||||
|
remote_hostname: unicast.uncensoreddns.org
|
||||||
|
zones:
|
||||||
|
- name: example.internal
|
||||||
|
type: forward
|
||||||
|
forward: only
|
||||||
|
forwarders:
|
||||||
|
- 10.0.0.53
|
||||||
|
- 10.0.0.54
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
driver:
|
driver:
|
||||||
name: podman
|
name: podman
|
||||||
platforms:
|
platforms:
|
||||||
- name: debian-bookworm
|
|
||||||
image: docker.io/jrei/systemd-debian:12
|
|
||||||
command: /lib/systemd/systemd
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
||||||
cgroupns_mode: host
|
|
||||||
- name: debian-trixie
|
- name: debian-trixie
|
||||||
image: docker.io/jrei/systemd-debian:13
|
image: docker.io/jrei/systemd-debian:13
|
||||||
command: /lib/systemd/systemd
|
command: /lib/systemd/systemd
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- name: Prepare
|
||||||
|
hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
- name: Install bind9-dnsutils package
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: bind9-dnsutils
|
||||||
|
state: present
|
||||||
|
|||||||
76
molecule/default/verify.yml
Normal file
76
molecule/default/verify.yml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: true
|
||||||
|
tasks:
|
||||||
|
- name: Check that BIND9 is installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: bind9
|
||||||
|
state: present
|
||||||
|
check_mode: true
|
||||||
|
register: __bind9_package_check
|
||||||
|
failed_when: __bind9_package_check is changed
|
||||||
|
|
||||||
|
- name: Check that BIND9 service is running
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: named
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
check_mode: true
|
||||||
|
register: __bind9_service_check
|
||||||
|
failed_when: __bind9_service_check is changed
|
||||||
|
|
||||||
|
- name: Check that named.conf.options exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /etc/bind/named.conf.options
|
||||||
|
register: __options_file
|
||||||
|
failed_when: not __options_file.stat.exists
|
||||||
|
|
||||||
|
- name: Check that named.conf.local exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /etc/bind/named.conf.local
|
||||||
|
register: __local_file
|
||||||
|
failed_when: not __local_file.stat.exists
|
||||||
|
|
||||||
|
- name: Read named.conf.options content
|
||||||
|
ansible.builtin.slurp:
|
||||||
|
path: /etc/bind/named.conf.options
|
||||||
|
register: __options_content
|
||||||
|
|
||||||
|
- name: Verify forwarders are configured in options
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- "'forwarders' in __options_decoded"
|
||||||
|
- "'8.8.8.8' in __options_decoded"
|
||||||
|
- "'forward first' in __options_decoded"
|
||||||
|
fail_msg: Forwarders not properly configured in named.conf.options
|
||||||
|
vars:
|
||||||
|
__options_decoded: "{{ __options_content.content | b64decode }}"
|
||||||
|
|
||||||
|
- name: Read named.conf.local content
|
||||||
|
ansible.builtin.slurp:
|
||||||
|
path: /etc/bind/named.conf.local
|
||||||
|
register: __local_content
|
||||||
|
|
||||||
|
- name: Verify forward zone is configured
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- "'zone \"example.internal\"' in __local_decoded"
|
||||||
|
- "'type forward' in __local_decoded"
|
||||||
|
- "'forward only' in __local_decoded"
|
||||||
|
fail_msg: Forward zone not properly configured in named.conf.local
|
||||||
|
vars:
|
||||||
|
__local_decoded: "{{ __local_content.content | b64decode }}"
|
||||||
|
|
||||||
|
- name: Test DNS resolution using localhost
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: dig @localhost google.com +short
|
||||||
|
register: __dns_query
|
||||||
|
changed_when: false
|
||||||
|
failed_when: __dns_query.rc != 0
|
||||||
|
|
||||||
|
- name: Verify DNS query returned results
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- __dns_query.stdout_lines | length > 0
|
||||||
|
fail_msg: DNS forwarding is not working
|
||||||
@@ -15,10 +15,16 @@
|
|||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0750
|
mode: "0750"
|
||||||
when: bind9_backup_config is defined and bind9_backup_config | bool
|
when: bind9_backup_config is defined and bind9_backup_config | bool
|
||||||
|
|
||||||
- name: Deploy and Validate Configuration
|
- name: Deploy and Validate Configuration
|
||||||
|
tags:
|
||||||
|
- bind9
|
||||||
|
- template
|
||||||
|
notify:
|
||||||
|
- Backup bind config
|
||||||
|
- Restart bind
|
||||||
block:
|
block:
|
||||||
- name: Create backup of current config
|
- name: Create backup of current config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -27,9 +33,9 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
owner: root
|
owner: root
|
||||||
group: bind
|
group: bind
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
|
changed_when: false
|
||||||
failed_when: false # It's okay if the file doesn't exist yet
|
failed_when: false # It's okay if the file doesn't exist yet
|
||||||
# We do this for every file in the loop
|
|
||||||
loop: "{{ bind9_config }}"
|
loop: "{{ bind9_config }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
@@ -40,11 +46,11 @@
|
|||||||
dest: "{{ bind9_cfgdir }}/{{ item.name }}"
|
dest: "{{ bind9_cfgdir }}/{{ item.name }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: bind
|
group: bind
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
loop: "{{ bind9_config }}"
|
loop: "{{ bind9_config }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
register: _template_result
|
register: bind9_template_result
|
||||||
|
|
||||||
- name: Validate configuration using named-checkconf
|
- name: Validate configuration using named-checkconf
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
@@ -59,7 +65,7 @@
|
|||||||
remote_src: true
|
remote_src: true
|
||||||
owner: root
|
owner: root
|
||||||
group: bind
|
group: bind
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
loop: "{{ bind9_config }}"
|
loop: "{{ bind9_config }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
@@ -67,7 +73,9 @@
|
|||||||
|
|
||||||
- name: Fail due to invalid configuration
|
- name: Fail due to invalid configuration
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: "Configuration validation failed. Changes have been reverted. Check the logs for named-checkconf errors."
|
msg: |
|
||||||
|
Configuration validation failed. Changes have been reverted.
|
||||||
|
Check the logs for named-checkconf errors.
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Remove backup files
|
- name: Remove backup files
|
||||||
@@ -77,14 +85,7 @@
|
|||||||
loop: "{{ bind9_config }}"
|
loop: "{{ bind9_config }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
when: bind9_backup_config | bool is false # Keep if backup is forced, otherwise cleanup temporary atomic backup
|
when: bind9_backup_config | bool is false
|
||||||
|
|
||||||
tags:
|
|
||||||
- bind9
|
|
||||||
- template
|
|
||||||
notify:
|
|
||||||
- Backup bind config
|
|
||||||
- Restart bind
|
|
||||||
|
|
||||||
- name: Ensure the named service is started
|
- name: Ensure the named service is started
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
|
|||||||
@@ -110,4 +110,36 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ name }} "{{ value }}";
|
{{ name }} "{{ value }}";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro list_address_port_tls(dict, indent=bind9_config_indent) %}
|
||||||
|
{# This macro is for use for statements with grammar like #}
|
||||||
|
{# address port 00 tls str; address port 00 tls str; #}
|
||||||
|
{# it is usually called by a parent macro #}
|
||||||
|
{% filter indent(indent, true) %}
|
||||||
|
{% for item in dict %}
|
||||||
|
{% if item is not mapping %}
|
||||||
|
{{ item }};
|
||||||
|
{% else %}
|
||||||
|
{{ item.address }}
|
||||||
|
{{- (' port ' + item.port | string) if item.port is defined and item.port -}}
|
||||||
|
{{- (' tls ' + item.tls | string) if item.tls is defined and item.tls -}};
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfilter %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro parent_address_port_tls(name, dict) %}
|
||||||
|
{# This macro is for use for statements with grammar like #}
|
||||||
|
{# statement port 00 tls str { address port 00 tls str; address port 00 tls str; } #}
|
||||||
|
{# the list inside the statement is handled by list_address_port_tls #}
|
||||||
|
{% if dict is not mapping and dict is iterable %}
|
||||||
|
{{ name }} {
|
||||||
|
{{ list_address_port_tls(dict) }}};
|
||||||
|
{% else %}
|
||||||
|
{{ name }}
|
||||||
|
{{- (' port ' + dict.port | string) if dict.port is defined and dict.port -}}
|
||||||
|
{{- (' tls ' + dict.tls | string) if dict.tls is defined and dict.tls }} {
|
||||||
|
{{ list_address_port_tls(dict.addresses) }}};
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
@@ -101,7 +101,7 @@ listen-on
|
|||||||
{{ functions.simple_item_list(item.options.listen_on.addresses) }}};
|
{{ functions.simple_item_list(item.options.listen_on.addresses) }}};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ functions.parent_address_port_dscp("forwarders", item.options.forwarders) if item.options.forwarders is defined and item.options.forwarders -}}
|
{{ functions.parent_address_port_tls("forwarders", item.options.forwarders) if item.options.forwarders is defined and item.options.forwarders -}}
|
||||||
{% if item.options.dual_stack_servers is defined and item.options.dual_stack_servers %}
|
{% if item.options.dual_stack_servers is defined and item.options.dual_stack_servers %}
|
||||||
dual-stack-servers
|
dual-stack-servers
|
||||||
{{ (' port ' + item.options.dual_stack_servers.port | string) if item.options.dual_stack_servers.port is defined and item.options.dual_stack_servers }} {
|
{{ (' port ' + item.options.dual_stack_servers.port | string) if item.options.dual_stack_servers.port is defined and item.options.dual_stack_servers }} {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ server-names {
|
|||||||
server-addresses {
|
server-addresses {
|
||||||
{{ functions.simple_item_list(zone.server_addresses) }}};
|
{{ functions.simple_item_list(zone.server_addresses) }}};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ functions.parent_address_port_dscp('forwarders', zone.forwarders) if zone.forwarders is defined and zone.forwarders -}}
|
{{ functions.parent_address_port_tls('forwarders', zone.forwarders) if zone.forwarders is defined and zone.forwarders -}}
|
||||||
{% if zone.allow_transfer is defined and zone.allow_transfer is not string %}
|
{% if zone.allow_transfer is defined and zone.allow_transfer is not string %}
|
||||||
allow-transfer
|
allow-transfer
|
||||||
{{- (' port ' + zone.allow_transfer.port | string) if zone.allow_transfer.port is defined and zone.allow_transfer.port -}}
|
{{- (' port ' + zone.allow_transfer.port | string) if zone.allow_transfer.port is defined and zone.allow_transfer.port -}}
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
remote_user: root
|
remote_user: root
|
||||||
roles:
|
roles:
|
||||||
- bind9
|
- bind9 # noqa: syntax-check[specific]
|
||||||
|
|||||||
Reference in New Issue
Block a user