diff --git a/BUILD_COMPLETE.md b/BUILD_COMPLETE.md index 5606b11..4598159 100644 --- a/BUILD_COMPLETE.md +++ b/BUILD_COMPLETE.md @@ -100,7 +100,6 @@ pip install dnspython protocol: tcp # SOA and DNSSEC records are ignored by default ignore_record_patterns: ['^_acme-challenge\..*'] - verbose: true # Show per-record actions zones: - name: example.com dns_server: ns1.example.com diff --git a/COLLECTION_SUMMARY.md b/COLLECTION_SUMMARY.md index 1ee6c22..130a691 100644 --- a/COLLECTION_SUMMARY.md +++ b/COLLECTION_SUMMARY.md @@ -98,7 +98,6 @@ pip install -r requirements.txt key_secret: "{{ vault_dns_key }}" # SOA and DNSSEC records are ignored by default # Record validation is enabled by default - verbose: true zones: - name: example.com dns_server: ns1.example.com diff --git a/README.md b/README.md index 05c5cae..80180ec 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ for more details. # DNSSEC and SOA records are now ignored by default ignore_record_patterns: ['^_acme-challenge\..*'] # Record validation is enabled by default - verbose: true # Show per-record actions + # Use -v flag to see per-record actions (Added, Removed, Changed, Skipped) zones: - name: example.com dns_server: ns1.example.com diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index f6715cb..e888148 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -35,6 +35,7 @@ pip install dnspython ``` **Note**: By default, SOA 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) @@ -186,7 +187,6 @@ dig @ns1.example.com example.com MX # SOA and DNSSEC records are ignored by default ignore_record_patterns: - '^_acme-challenge\..*' - verbose: true # Show per-record actions zones: - name: example.com records: "{{ static_records }}" @@ -200,7 +200,6 @@ dig @ns1.example.com example.com MX key_name: "nsupdate" key_secret: "{{ vault_dns_key }}" dns_server: ns1.dns.com # Shared server for all zones - verbose: true # Show detailed changes zones: - name: example.com records: "{{ example_com_records }}" diff --git a/docs/nsupdate_zone_example.yml b/docs/nsupdate_zone_example.yml index b8108f8..63779c3 100644 --- a/docs/nsupdate_zone_example.yml +++ b/docs/nsupdate_zone_example.yml @@ -71,7 +71,6 @@ ignore_record_patterns: - '^_acme-challenge\..*' - '^_dnsauth\..*' - verbose: true # Show per-record actions zones: - name: example.com dns_server: ns1.example.com @@ -99,7 +98,6 @@ key_name: "{{ dns_key_name }}" key_secret: "{{ dns_key_secret }}" dns_server: ns1.example.com # Global server for all zones - verbose: true zones: - name: example.com records: diff --git a/docs/sample_zone_format.yml b/docs/sample_zone_format.yml index 1662c93..cce7af9 100644 --- a/docs/sample_zone_format.yml +++ b/docs/sample_zone_format.yml @@ -82,7 +82,6 @@ list_of_nsupdate_zones: # SOA and DNSSEC records are ignored by default ignore_record_patterns: - '^_acme-challenge\..*' - verbose: true # Show detailed per-record actions zones: "{{ list_of_nsupdate_zones }}" register: zone_update_result diff --git a/plugins/modules/nsupdate_zone.py b/plugins/modules/nsupdate_zone.py index 0c20797..17e2c0a 100644 --- a/plugins/modules/nsupdate_zone.py +++ b/plugins/modules/nsupdate_zone.py @@ -157,12 +157,10 @@ options: - Can be an IPv4/IPv6 address or FQDN. - If specified, zones do not need O(zones[].dns_server). type: str - verbose: - description: - - Enable verbose output showing per-record actions. - - When enabled, includes details about which records were added, removed, changed, or skipped. - type: bool - default: false +notes: + - Verbose output showing per-record actions is available with C(-v) flag. + - Use C(-v) to see which records were Added, Removed, Changed, or Skipped. + - Use C(--diff) flag to see before/after state of DNS records. """ EXAMPLES = r""" @@ -221,7 +219,7 @@ EXAMPLES = r""" ignore_record_patterns: - '^_acme-challenge\..*' - '^_dnsauth\..*' - verbose: true # Show per-record actions + # Use -v flag for per-record action details zones: - name: example.com dns_server: 10.1.1.1 @@ -842,7 +840,7 @@ class DNSZoneManager: if total_changes == 0: result['changed'] = False - if self.module.params['verbose']: + if self.module._verbosity >= 1: # Include verbose output even if no changes result['changes']['verbose'] = changes.get('verbose_actions', []) return result @@ -852,8 +850,8 @@ class DNSZoneManager: result['changes']['deletes'] = len(changes['deletes']) result['changes']['updates'] = len(changes['updates']) - # Add verbose output if enabled - if self.module.params['verbose']: + # Add verbose output if verbosity enabled + if self.module._verbosity >= 1: result['changes']['verbose'] = changes.get('verbose_actions', []) # Add diff output if enabled @@ -951,8 +949,7 @@ def main(): ignore_dnssec_records=dict(type='bool', default=True), ignore_soa_records=dict(type='bool', default=True), validate_records=dict(type='bool', default=True), - dns_server=dict(type='str'), - verbose=dict(type='bool', default=False) + dns_server=dict(type='str') ), supports_check_mode=True, supports_diff_mode=True,