1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
James Tanner 2014-01-16 14:24:11 -05:00
parent 02ce5af6df
commit 559e89036b

View file

@ -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