Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Akulenok
5550a57777 Remove invalid supports_diff parameter (v1.3.2)
- AnsibleModule.__init__() does not accept supports_diff or supports_diff_mode
- Diff mode support is declared via attributes in DOCUMENTATION
- This was the actual root cause of the error
- Bump version to 1.3.2
2026-01-29 21:33:01 +01:00
Daniel Akulenok
5307eef1b7 Fix AnsibleModule supports_diff parameter (v1.3.1)
- Correct supports_diff_mode to supports_diff in nsupdate_zone.py
- This fixes: AnsibleModule.__init__() got an unexpected keyword argument 'supports_diff_mode'
- Bump version to 1.3.1
2026-01-29 21:29:52 +01:00
Daniel Akulenok
bc89896e59 Refactor code structure for improved readability and maintainability
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 12s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 29s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 29s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 27s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
2026-01-29 21:25:36 +01:00
Daniel Akulenok
33a59e8427 chore(config): update collection metadata and linting rules
galaxy.yml:
- Removed ansible-creator initialization comment
- Updated repository URL to GitHub reference
- Updated documentation URL to Ansible docs
- Updated homepage and issues URLs

meta/runtime.yml:
- Verified requires_ansible: >=2.15.0

.yamllint:
- Added octal-values validation rules
- Updated truthy validation (only true/false)
- Maintained consistent formatting rules

These changes ensure compliance with Ansible collection standards.
2026-01-29 21:24:26 +01:00
Daniel Akulenok
0a4c83c4b0 docs(examples): update to use Ansible FQCN
- Updated debug tasks to use ansible.builtin.debug (FQCN)
- Removed trailing whitespace
- Fixed line length violations
- Examples now follow Ansible guidelines
2026-01-29 21:24:16 +01:00
Daniel Akulenok
51a798b7ce refactor(core): remove ansible.utils.display dependency
Refactored verbose output to use standard Ansible logging patterns:
- Removed: from ansible.utils.display import Display
- Changed: self.display.vvv() → self.module.debug()
- Maintains verbosity levels with self.module._verbosity checks
- Reduces external dependencies
- Improves compatibility with standard Ansible execution

The module now logs zone changes (Added, Removed, Changed, Skipped)
using self.module.debug() which works with -v and -vv flags.
2026-01-29 21:24:07 +01:00
Daniel Akulenok
b0ff4f6bf3 chore(release): bump version to 1.3.0
- Guidelines compliance improvements
- Type hints for all functions
- Refactored logging (removed ansible.utils dependency)
- Documentation formatting updates
2026-01-29 21:23:58 +01:00
Daniel Akulenok
e2ed39b902 chore: bump version to 1.2.0
Version 1.2.0 includes:
- Display class integration for Ansible-standard verbosity
- Enhanced --diff flag showing detailed record changes
- Improved logging following Ansible Developer Guide
- Compliance with ansible-creator agents.md specifications
2026-01-29 20:57:27 +01:00
Daniel Akulenok
4843c71606 feat: show detailed changes with --diff flag
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 12s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 30s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 30s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 28s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 6s
- Display specific record changes when --diff flag is used
- Add 'or self.module._diff' condition to all change logging
- Shows Added, Removed, Changed records with --diff (same as -v)
- Skipped records still only shown with -vv
- Provides detailed diff output without requiring -v flag
- Users can now see what changed with just --diff flag
2026-01-29 20:55:26 +01:00
Daniel Akulenok
b1f2d9f3a1 refactor: use Display class instead of module.log() per Ansible spec
- Import Display class from ansible.utils.display
- Initialize display instance in DNSZoneManager
- Replace all module.log() calls with display.vvv() and display.vvvv()
- Use display.vvv() for important actions (-v verbosity)
- Use display.vvvv() for skipped records (-vv verbosity)
- Follows Ansible Developer Guide standards for verbosity-based output
- Aligns with ansible-creator agents.md specification
2026-01-29 20:53:09 +01:00
Daniel Akulenok
23fd133bc0 refactor: use Ansible standard logging instead of verbose result dict
- Replace verbose_actions in result dict with module.log() calls
- Log per-record actions directly when verbosity >= 1:
  - Added, Removed, Changed actions logged with -v
  - Skipped (unchanged) records logged with -vv
- Remove verbose key from result['changes'] dict
- Simplify _format_diff() to work directly with changes dict
- Follows Ansible conventions for verbose output
- Output now goes to Ansible's logging system instead of result payload
2026-01-29 20:50:32 +01:00
Daniel Akulenok
d37d09b631 refactor: replace verbose flag with Ansible verbosity (-v) flag
- Remove custom 'verbose' parameter from module
- Use Ansible's built-in verbosity setting (module._verbosity)
- Verbose output now shown with -v, -vv, -vvv flags
- Add notes to DOCUMENTATION explaining -v flag usage
- Update all examples to remove verbose: true parameter
- Update all documentation to mention -v flag instead
- Simplifies module interface by leveraging Ansible conventions
2026-01-29 20:48:15 +01:00
Daniel Akulenok
4625f2cb1e docs: update all documentation to reflect v1.1.0 features
- Update all examples to show new defaults (ignore_dnssec_records, ignore_soa_records, validate_records)
- Add verbose output examples throughout documentation
- Show global dns_server parameter usage
- Remove all references to deprecated parallel_zones parameter
- Update QUICK_START.md with new best practices
- Update README.md with new feature descriptions
- Update module EXAMPLES with verbose flag and current defaults
- Update all example playbooks (nsupdate_zone_example.yml, sample_zone_format.yml)
- Simplify examples by relying on sensible defaults
2026-01-29 20:45:14 +01:00
Daniel Akulenok
b724c568b9 feat: add AGENTS.md with instructions for best practices
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 13s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 29s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 31s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 29s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
2026-01-29 20:32:24 +01:00
Daniel Akulenok
1afa63cdb1 chore: bump version to 1.1.0 and update changelog
Version 1.1.0 includes:
- New ignore_soa_records and ignore_dnssec_records flags
- Record validation with comprehensive error messages
- Global dns_server parameter
- Verbose output with per-record actions
- Full diff mode support
2026-01-29 20:31:05 +01:00
Daniel Akulenok
4b4c579f8d feat: add ignore_soa_records and validate_records flags with comprehensive validation
- Add ignore_soa_records flag (default: true) to automatically ignore SOA records
- Add ignore_dnssec_records flag with default changed to true
- Add validate_records flag (default: true) with record value validation
- Implement _validate_record_values() method supporting:
  - IPv4/IPv6 address validation for A/AAAA records
  - FQDN validation for CNAME/MX/NS/PTR/SRV records
  - Text record acceptance for TXT/SPF records
- Add global dns_server parameter for shared server configuration
- Add verbose output with per-record action tracking
- Add diff mode support for --diff flag
2026-01-29 20:31:01 +01:00
Daniel Akulenok
faef9a7ccf publish
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 13s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 1m20s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 1m11s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 1m14s
Test Collection / Python Syntax Check (push) Successful in 7s
Test Collection / Build Collection (push) Failing after 21s
Test Collection / YAML and Ansible Lint (push) Successful in 12s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
2026-01-29 11:09:57 +01:00
Daniel Akulenok
0142f806c9 First commit 2026-01-29 11:05:17 +01:00