From 2796b5ee2a6587b0a5a0f40cfc10d37e1ce9b98d Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Thu, 4 Apr 2013 12:44:03 -0400 Subject: [PATCH] simple fix for issue 2564 when we encounter a group we've not seen before - we need to make sure we make it a subgroup of 'all', no matter what --- lib/ansible/inventory/ini.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/inventory/ini.py b/lib/ansible/inventory/ini.py index d05037bc0b9..78d5743fa3a 100644 --- a/lib/ansible/inventory/ini.py +++ b/lib/ansible/inventory/ini.py @@ -69,7 +69,8 @@ class InventoryParser(object): if line.find(":vars") != -1 or line.find(":children") != -1: active_group_name = active_group_name.rsplit(":", 1)[0] if active_group_name not in self.groups: - self.groups[active_group_name] = Group(name=active_group_name) + new_group = self.groups[active_group_name] = Group(name=active_group_name) + all.add_child_group(new_group) active_group_name = None elif active_group_name not in self.groups: new_group = self.groups[active_group_name] = Group(name=active_group_name)