mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 05:19:09 -07:00
Fixes list comparison (#26042)
This commit is contained in:
parent
1f8575ec97
commit
8765eadb30
1 changed files with 1 additions and 1 deletions
|
@ -1355,7 +1355,7 @@ class Container(DockerBaseClass):
|
||||||
self.log("comparing lists: %s" % key)
|
self.log("comparing lists: %s" % key)
|
||||||
set_a = set(getattr(self.parameters, key))
|
set_a = set(getattr(self.parameters, key))
|
||||||
set_b = set(value)
|
set_b = set(value)
|
||||||
match = (set_a == set_b)
|
match = (set_b >= set_a)
|
||||||
elif isinstance(getattr(self.parameters, key), list) and not len(getattr(self.parameters, key)) \
|
elif isinstance(getattr(self.parameters, key), list) and not len(getattr(self.parameters, key)) \
|
||||||
and value is None:
|
and value is None:
|
||||||
# an empty list and None are ==
|
# an empty list and None are ==
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue