diff --git a/lib/ansible/inventory/script.py b/lib/ansible/inventory/script.py index 42c46559d9..9474c3ebd7 100644 --- a/lib/ansible/inventory/script.py +++ b/lib/ansible/inventory/script.py @@ -72,7 +72,10 @@ class InventoryScript(object): self.host_vars_from_top = data['hostvars'] 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 if not isinstance(data, dict):