Commit 149f1f9f by Rob Parrott

invalidate group cache so that a group added by the add_host module will be…

invalidate group cache so that a group added by the add_host module will be relfected in the groups variable in later plays.
parent 2baece3a
......@@ -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) ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment