From 149f1f9f3c62f632d6dc0eb876248ed215ccdf56 Mon Sep 17 00:00:00 2001 From: Rob Parrott Date: Tue, 19 Mar 2013 13:57:45 -0400 Subject: [PATCH] invalidate group cache so that a group added by the add_host module will be relfected in the groups variable in later plays. --- lib/ansible/inventory/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index 9cca2bc348..564967dc2e 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -288,6 +288,7 @@ class Inventory(object): def add_group(self, group): self.groups.append(group) + self._groups_list = None # invalidate internal cache def list_hosts(self, pattern="all"): return [ h.name for h in self.get_hosts(pattern) ]