there can only be one

pull/82367/head
Brian Coca 12 months ago
parent 4f9d304552
commit 4fc8e7c7e7

@ -238,6 +238,7 @@ class InventoryData(object):
# match on host name/inventory_hostname is unique id # match on host name/inventory_hostname is unique id
if hostobj.name == host.name: if hostobj.name == host.name:
del self.hosts[hostobj] del self.hosts[hostobj]
break
for group in self.groups: for group in self.groups:
g = self.groups[group] g = self.groups[group]

@ -243,6 +243,7 @@ class Group:
for hostobj in self.hosts: for hostobj in self.hosts:
if hostobj.name == host.name: if hostobj.name == host.name:
self.hosts.remove(hostobj) self.hosts.remove(hostobj)
break
self._hosts.remove(host.name) self._hosts.remove(host.name)
host.remove_group(self) host.remove_group(self)
self.clear_hosts_cache() self.clear_hosts_cache()

Loading…
Cancel
Save