mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Fix nsupdate when updating NS record
* Changelog fragment
* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Switch to fallback to AUTHORITY instead of using with NS type.
* Update plugins/modules/net_tools/nsupdate.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nsupdate.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ad8965218d
)
Co-authored-by: Jonathan Lung <lungj@users.noreply.github.com>
This commit is contained in:
parent
37fc85b03a
commit
465b0c72a6
2 changed files with 6 additions and 1 deletions
2
changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml
Normal file
2
changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- nsupdate - compatibility with NS records (https://github.com/ansible-collections/community.general/pull/5112).
|
|
@ -426,7 +426,10 @@ class RecordManager(object):
|
|||
if lookup.rcode() != dns.rcode.NOERROR:
|
||||
self.module.fail_json(msg='Failed to lookup TTL of existing matching record.')
|
||||
|
||||
current_ttl = lookup.answer[0].ttl
|
||||
if self.module.params['type'] == 'NS':
|
||||
current_ttl = lookup.answer[0].ttl if lookup.answer else lookup.authority[0].ttl
|
||||
else:
|
||||
current_ttl = lookup.answer[0].ttl
|
||||
return current_ttl != self.module.params['ttl']
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue