1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

dnsmadeeasy: only get monitor if it is not null api response (#4459) (#4500)

* Only get monitor if it is not null api response

* Add changelog fragment

* Update changelogs/fragments/4459-only-get-monitor-if-it-is-not-null-api-response.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/dnsmadeeasy.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: drevai <revai.dominik@gravityrd.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 06675034fe)

Co-authored-by: drevai753 <86595897+drevai753@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2022-04-13 11:16:39 +00:00 committed by GitHub
parent 26d5409a87
commit 70a3dae965
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- dnsmadeeasy - fix failure on deleting DNS entries when API response does not contain monitor value (https://github.com/ansible-collections/community.general/issues/3620).

View file

@ -623,7 +623,7 @@ def main():
# Fetch existing monitor if the A record indicates it should exist and build the new monitor
current_monitor = dict()
new_monitor = dict()
if current_record and current_record['type'] == 'A':
if current_record and current_record['type'] == 'A' and current_record.get('monitor'):
current_monitor = DME.getMonitor(current_record['id'])
# Build the new monitor