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

Avoid duplicates of the 'all' group when using inventory script.

Do not recreate an 'all' group when it is in the inventory script's
output, but use the one created upfront.
This commit is contained in:
Stoned Elipot 2013-09-02 12:26:02 +02:00
parent 266d2008d8
commit 6cbd94dfae

View file

@ -72,7 +72,10 @@ class InventoryScript(object):
self.host_vars_from_top = data['hostvars'] self.host_vars_from_top = data['hostvars']
continue continue
group = groups[group_name] = Group(group_name) if group_name != all.name:
group = groups[group_name] = Group(group_name)
else:
group = all
host = None host = None
if not isinstance(data, dict): if not isinstance(data, dict):