docs: clarify BIND9 9.20 branch strategy

This commit is contained in:
Daniel Akulenok
2026-07-02 10:40:18 +02:00
parent cd3a35e7a9
commit 4e1dc31818
3 changed files with 45 additions and 68 deletions
+8 -25
View File
@@ -270,36 +270,20 @@ bind9-grammar/
## Version-Specific Features
### Version Detection
### Branch-Level Version Targeting
The role will detect BIND9 version at runtime:
The role currently uses branch-level version targeting instead of runtime version detection:
```yaml
# tasks/main.yml (planned implementation)
- name: Detect BIND9 version
ansible.builtin.command: named -V
register: _bind9_version_output
changed_when: false
- `main` targets BIND9 9.18.x LTS.
- `9.20` targets BIND9 9.20+ feature releases.
- name: Set BIND9 version facts
ansible.builtin.set_fact:
bind9_version_full: "{{ _bind9_version_output.stdout | regex_search('BIND (\\S+)', '\\1') | first }}"
bind9_version_major: "{{ _bind9_version_output.stdout | regex_search('BIND (\\d+)\\.(\\d+)', '\\1') | first }}"
bind9_version_minor: "{{ _bind9_version_output.stdout | regex_search('BIND (\\d+)\\.(\\d+)', '\\2') | first }}"
```
Each branch carries the templates, grammar data, documentation, and tests appropriate for its supported BIND9 series. This keeps generated configuration predictable and avoids mixing incompatible BIND9 grammar rules in one template path.
### Conditional Configuration
### Runtime Detection
Templates will use version-aware conditionals:
Runtime version detection is not part of the current implementation. The role does not set `bind9_version_full`, `bind9_version_major`, `bind9_version_minor`, or `bind9_version`, and templates do not branch on those values.
```jinja2
{# templates/named.conf.options.j2 (planned) #}
{% if bind9_version_major | int >= 20 %}
{# BIND9 9.20+ specific options #}
{% else %}
{# BIND9 9.18 options #}
{% endif %}
```
Runtime detection may be reconsidered in the future if maintaining separate version branches becomes more expensive than supporting multiple BIND9 series from one branch. That future design would require dedicated tasks, public metadata, template changes, and Molecule coverage before being documented as supported behavior.
## Migration Guidance
@@ -367,4 +351,3 @@ See `CHANGELOG.md` for version-specific migration notes.
| Date | Version | Changes |
|------|---------|---------|
| 2026-02-07 | 1.0 | Initial version support policy |