Create a set of all the hosts in a group to prevent duplicates

Fixes #1516.
pull/1648/head
Daniel Hokka Zakrisson 12 years ago
parent 44af1408ee
commit 17e4ce97a4

@ -50,11 +50,11 @@ class Group(object):
def get_hosts(self):
hosts = []
hosts = set()
for kid in self.child_groups:
hosts.extend(kid.get_hosts())
hosts.extend(self.hosts)
return hosts
hosts.update(kid.get_hosts())
hosts.update(self.hosts)
return list(hosts)
def get_variables(self):

Loading…
Cancel
Save