diff --git a/lib/ansible/inventory/host.py b/lib/ansible/inventory/host.py index f6089f07ed..a561b951b4 100644 --- a/lib/ansible/inventory/host.py +++ b/lib/ansible/inventory/host.py @@ -36,6 +36,8 @@ class Host: return self.deserialize(data) def __eq__(self, other): + if not isinstance(other, Host): + return False return self.name == other.name def __ne__(self, other):