mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Ensure hosts aren't duplicated in groups
This commit is contained in:
parent
9730d96517
commit
b6ee9163e3
2 changed files with 3 additions and 2 deletions
|
@ -231,7 +231,7 @@ class InventoryData(object):
|
|||
else:
|
||||
h = self.hosts[host]
|
||||
|
||||
if g and host not in g.get_hosts():
|
||||
if g and h not in g.get_hosts():
|
||||
g.add_host(h)
|
||||
self._groups_dict_cache = {}
|
||||
display.debug("Added host %s to group %s" % (host, group))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue