Add ignore_ns_records flag and support for extra keys in zones/records parameters
- Add ignore_ns_records flag (default: true) to automatically ignore NS records - Add options_ignore_list to zones and records to allow extra keys (e.g., comment, type) - Update documentation to reflect NS records are now ignored by default - Add changelog entry for v1.3.3 release
This commit is contained in:
@@ -4,6 +4,20 @@ Valid.Nsupdate_zone Collection Release Notes
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
v1.3.3
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
New features for improved record type ignoring.
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
- Add ignore_ns_records flag (default: true) to automatically ignore NS records
|
||||
- Add support for extra keys in zones and records parameters via options_ignore_list
|
||||
|
||||
v1.3.2
|
||||
======
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ pip install dnspython
|
||||
value: 192.168.1.10
|
||||
```
|
||||
|
||||
**Note**: By default, SOA and DNSSEC records are ignored, and record validation is enabled.
|
||||
**Note**: By default, SOA, NS, and DNSSEC records are ignored, and record validation is enabled.
|
||||
**Tip**: Run with `-v` flag to see detailed per-record actions.
|
||||
|
||||
## DNS Server Setup (BIND Example)
|
||||
|
||||
@@ -143,6 +143,13 @@ options:
|
||||
- Recommended to keep enabled as SOA records are typically managed by DNS servers themselves.
|
||||
type: bool
|
||||
default: true
|
||||
ignore_ns_records:
|
||||
description:
|
||||
- Automatically ignore NS records.
|
||||
- When enabled, NS records are added to the ignore list.
|
||||
- Recommended to keep enabled as NS records are typically managed by DNS servers themselves.
|
||||
type: bool
|
||||
default: true
|
||||
validate_records:
|
||||
description:
|
||||
- Validate record values before applying changes.
|
||||
@@ -365,6 +372,10 @@ class DNSZoneManager:
|
||||
if module.params.get('ignore_soa_records', True):
|
||||
self.ignore_types.add('SOA')
|
||||
|
||||
# Add NS record type to ignore list if enabled
|
||||
if module.params.get('ignore_ns_records', True):
|
||||
self.ignore_types.add('NS')
|
||||
|
||||
self.ignore_patterns = [re.compile(pattern) for pattern in module.params['ignore_record_patterns']]
|
||||
|
||||
# State
|
||||
@@ -894,9 +905,11 @@ def main() -> None:
|
||||
value=dict(type='raw', required=True),
|
||||
ttl=dict(type='int'),
|
||||
state=dict(type='str', choices=['present', 'absent'], default='present')
|
||||
),
|
||||
options_ignore_list=['comment']
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
options_ignore_list=['type', 'comment']
|
||||
),
|
||||
key_name=dict(type='str'),
|
||||
key_secret=dict(type='str', no_log=True),
|
||||
@@ -919,6 +932,7 @@ def main() -> None:
|
||||
ignore_record_patterns=dict(type='list', elements='str', default=[]),
|
||||
ignore_dnssec_records=dict(type='bool', default=True),
|
||||
ignore_soa_records=dict(type='bool', default=True),
|
||||
ignore_ns_records=dict(type='bool', default=True),
|
||||
validate_records=dict(type='bool', default=True),
|
||||
dns_server=dict(type='str')
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user