From 5aebcd4f7f4973936d351b615b25fe2aa19ff824 Mon Sep 17 00:00:00 2001 From: jctanner Date: Mon, 18 Sep 2017 20:22:30 -0400 Subject: [PATCH] Remove redundant check for group membership in add_host (#30530) --- lib/ansible/inventory/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/data.py b/lib/ansible/inventory/data.py index fc38d29a7dd..4613141795f 100644 --- a/lib/ansible/inventory/data.py +++ b/lib/ansible/inventory/data.py @@ -204,7 +204,7 @@ class InventoryData(object): else: h = self.hosts[host] - if g and h not in g.get_hosts(): + if g: g.add_host(h) self._groups_dict_cache = {} display.debug("Added host %s to group %s" % (host, group))