Fixes #5631 Return a unique list of hosts when joining groups

pull/5658/head
James Tanner 11 years ago
parent 02ce5af6df
commit 559e89036b

@ -179,7 +179,7 @@ class Inventory(object):
elif p.startswith("&"): elif p.startswith("&"):
hosts = [ h for h in hosts if h in that ] hosts = [ h for h in hosts if h in that ]
else: 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 return hosts

Loading…
Cancel
Save