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)

* 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>
This commit is contained in:
drevai753 2022-04-13 07:10:15 +02:00 committed by GitHub
parent 8ccc4d1fbb
commit 06675034fe
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