Skip to content

Commit

Permalink
fix so module nios_host_record can remove aliases (#1470)
Browse files Browse the repository at this point in the history
* fix for #1335

* added changelog fragment

* Update changelogs/fragments/nios_host_record-fix-aliases-removal.yml

Co-authored-by: Felix Fontein <[email protected]>

* extend changelog to specify CNAMES

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
pescobar and felixfontein authored Dec 14, 2020
1 parent f37eb12 commit 496be77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/nios_host_record-fix-aliases-removal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- nios_host_record - fix to remove ``aliases`` (CNAMES) for configuration comparison (https://github.com/ansible-collections/community.general/issues/1335).
3 changes: 3 additions & 0 deletions plugins/module_utils/net_tools/nios/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ def compare_objects(self, current_object, proposed_object):
return False

elif isinstance(proposed_item, list):
if key == 'aliases':
if set(current_item) != set(proposed_item):
return False
for subitem in proposed_item:
if not self.issubset(subitem, current_item):
return False
Expand Down

0 comments on commit 496be77

Please sign in to comment.