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

fix so module nios_host_record can remove aliases (#1470) (#1490)

* fix for https://github.com/ansible-collections/community.general/issues/1335

* added changelog fragment

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

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

* extend changelog to specify CNAMES

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 496be77a2b)

Co-authored-by: Pablo Escobar Lopez <pescobar001@gmail.com>
This commit is contained in:
patchback[bot] 2020-12-15 20:49:52 +01:00 committed by GitHub
parent 6d4760eb20
commit 3960153f70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -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).

View file

@ -455,6 +455,9 @@ class WapiModule(WapiBase):
return False return False
elif isinstance(proposed_item, list): elif isinstance(proposed_item, list):
if key == 'aliases':
if set(current_item) != set(proposed_item):
return False
for subitem in proposed_item: for subitem in proposed_item:
if not self.issubset(subitem, current_item): if not self.issubset(subitem, current_item):
return False return False