From 2d86671aa5b0fcdabe35f88fc5e09197acd3f17d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 1 Mar 2013 17:58:56 -0500 Subject: [PATCH] for #2196 now gruopby module invalidates host cached variables so they can be reevaluated with new groups Signed-off-by: Brian Coca --- lib/ansible/runner/action_plugins/group_by.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/runner/action_plugins/group_by.py b/lib/ansible/runner/action_plugins/group_by.py index a4f9df67c2..3e51c95a76 100644 --- a/lib/ansible/runner/action_plugins/group_by.py +++ b/lib/ansible/runner/action_plugins/group_by.py @@ -68,6 +68,7 @@ class ActionModule(object): inv_group = ansible.inventory.Group(name=group) inventory.add_group(inv_group) for host in hosts: + del self.runner.inventory._vars_per_host[host] inv_host = inventory.get_host(host) if not inv_host: inv_host = ansible.inventory.Host(name=host)