ansible-collections / community.windows

Windows community collection for Ansible
https://galaxy.ansible.com/community/windows
GNU General Public License v3.0
198 stars 153 forks source link

DNS record - add possibility to enable aging #480

Closed PfurtschellerP closed 1 year ago

PfurtschellerP commented 1 year ago
SUMMARY

The current win_dns_record module only creates static dns records. The proposed change would allow for aging to be activated on the record (if the targeted zone supports it).

This unfortunately can't be set using Set-DnsServerResourceRecord (and Set-DnsServerResourceRecordAging only works one-way). That is why if a mismatch between what is requested and what is present is detected, the current record is removed and a new one is created.

ISSUE TYPE
COMPONENT NAME

win_dns_record

ADDITIONAL INFORMATION
github-actions[bot] commented 1 year ago

This pull request is stale because it has been open for 4 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.

PfurtschellerP commented 1 year ago

(Comment to get stale label removed)

jborean93 commented 1 year ago

Thanks for the PR, would it be possible to add this scenario as a test to https://github.com/ansible-collections/community.windows/tree/main/tests/integration/targets/win_dns_record? Are you also able to add a changelog fragment to the PR https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment to help document the changes when generated the next release changelog.

From a technical perspective the change makes sense but I'm no expert in DNS records and these cmdlets. @kenyon if you get a chance it would be great to see your perspective on this change.

github-actions[bot] commented 1 year ago

This pull request is stale because it has been open for 4 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.

PfurtschellerP commented 1 year ago

Okay. Added tests for A records. Are these sufficient enough? And should I add them to the other record types as well?

jborean93 commented 1 year ago

Sorry for the delay, just added some minor doc tweaks but the rest looks good.