From 559e89036b98127510794125beeaeebc82e0c141 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Thu, 16 Jan 2014 14:24:11 -0500 Subject: [PATCH] Fixes #5631 Return a unique list of hosts when joining groups --- lib/ansible/inventory/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index 14538db0078..e7979011cdd 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -179,7 +179,7 @@ class Inventory(object): elif p.startswith("&"): hosts = [ h for h in hosts if h in that ] else: - hosts.extend([ h for h in that if h not in hosts ]) + hosts.extend([ h for h in that if h.name not in [ y.name for y in hosts ] ]) return hosts