diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1525d35..7ea597f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 ====== diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index e888148..abbdf94 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -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) diff --git a/plugins/modules/nsupdate_zone.py b/plugins/modules/nsupdate_zone.py index 1c3619c..aa91735 100644 --- a/plugins/modules/nsupdate_zone.py +++ b/plugins/modules/nsupdate_zone.py @@ -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') ),