mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
3de08e1bfc
commit
17e8500202
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ class InventoryDirectory(object):
|
||||||
if 'ungrouped' in self.groups:
|
if 'ungrouped' in self.groups:
|
||||||
ungrouped = self.groups['ungrouped']
|
ungrouped = self.groups['ungrouped']
|
||||||
# loop on a copy of ungrouped hosts, as we want to change that list
|
# loop on a copy of ungrouped hosts, as we want to change that list
|
||||||
for host in ungrouped.hosts[:]:
|
for host in frozenset(ungrouped.hosts):
|
||||||
if len(host.groups) > 1:
|
if len(host.groups) > 1:
|
||||||
host.groups.remove(ungrouped)
|
host.groups.remove(ungrouped)
|
||||||
ungrouped.hosts.remove(host)
|
ungrouped.hosts.remove(host)
|
||||||
|
|
Loading…
Reference in a new issue