mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
[PR #11559/3194ed9d backport][stable-12] ipa_dnsrecord fix error when using dnsttl and nothing to change (#11587)
ipa_dnsrecord fix error when using dnsttl and nothing to change (#11559)
* ipa_dnsrecord fix error when using dnsttl and nothing to change
* Add changelog and bump version
* ipa_dnsrecord list comp in dnsrecord_find
* 11559 changelog fragment fix capitalization
* ipa_dnsrecord dnsrecord_find ttl transform to integer always
* ipa_dnsrecord dnsrecord_find method refactor
---------
(cherry picked from commit 3194ed9d36)
Co-authored-by: Dor Breger <75537576+DorBreger@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
79d8c9bd6e
commit
c853dfb1a8
2 changed files with 7 additions and 2 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ipa_dnsrecord - fix idempotency bug when using ``dnsttl`` due to wrong Python types (https://github.com/ansible-collections/community.general/pull/11559).
|
||||
|
|
@ -206,9 +206,12 @@ class DNSRecordIPAClient(IPAClient):
|
|||
|
||||
def dnsrecord_find(self, zone_name, record_name):
|
||||
if record_name == "@":
|
||||
return self._post_json(method="dnsrecord_show", name=zone_name, item={"idnsname": record_name, "all": True})
|
||||
method = "dnsrecord_show"
|
||||
else:
|
||||
return self._post_json(method="dnsrecord_find", name=zone_name, item={"idnsname": record_name, "all": True})
|
||||
method = "dnsrecord_find"
|
||||
result = self._post_json(method=method, name=zone_name, item={"idnsname": record_name, "all": True})
|
||||
result["dnsttl"] = [int(v) for v in result["dnsttl"]]
|
||||
return result
|
||||
|
||||
def dnsrecord_add(self, zone_name=None, record_name=None, details=None):
|
||||
item = dict(idnsname=record_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue