diff --git a/lib/ansible/module_utils/common/collections.py b/lib/ansible/module_utils/common/collections.py index 0a166cd4cf7..78f8bf3a296 100644 --- a/lib/ansible/module_utils/common/collections.py +++ b/lib/ansible/module_utils/common/collections.py @@ -28,6 +28,15 @@ class ImmutableDict(Hashable, Mapping): def __hash__(self): return hash(frozenset(self.items())) + def __eq__(self, other): + try: + if self.__hash__() == hash(other): + return True + except TypeError: + pass + + return False + def __repr__(self): return 'ImmutableDict({0})'.format(repr(self._store))