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:
Daniel Akulenok
2026-01-29 21:40:41 +01:00
parent 5550a57777
commit 9dc42d99c1
3 changed files with 31 additions and 3 deletions

View File

@@ -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')
),