Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/two_hostrecords_same_hostname.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- nios_host_record - "if len(ib_obj_ref) > 1" in module_utils/api.py results in weird behaviour. Adding "or (len(ib_obj_ref) >= 1 and ib_obj_type == NIOS_HOST_RECORD)" to the if-statement results in the wanted behaviour.
2 changes: 1 addition & 1 deletion plugins/module_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def run(self, ib_obj_type, ib_spec):
del proposed_object['view']

if ib_obj_ref:
if len(ib_obj_ref) > 1:
if len(ib_obj_ref) > 1 or (len(ib_obj_ref) >= 1 and ib_obj_type == NIOS_HOST_RECORD):
for each in ib_obj_ref:
# To check for existing A_record with same name with input A_record by IP
if each.get('ipv4addr') and each.get('ipv4addr') == proposed_object.get('ipv4addr'):
Expand Down