diff --git a/changelogs/fragments/nios_host_record-fix-aliases-removal.yml b/changelogs/fragments/nios_host_record-fix-aliases-removal.yml new file mode 100644 index 0000000000..3003c78429 --- /dev/null +++ b/changelogs/fragments/nios_host_record-fix-aliases-removal.yml @@ -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). diff --git a/plugins/module_utils/net_tools/nios/api.py b/plugins/module_utils/net_tools/nios/api.py index 7861d76c85..b01a54a400 100644 --- a/plugins/module_utils/net_tools/nios/api.py +++ b/plugins/module_utils/net_tools/nios/api.py @@ -455,6 +455,9 @@ class WapiModule(WapiBase): 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