From 6ad390a92bcf5e895d0280b5086752bdc23e93e9 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 2 Mar 2013 10:38:51 -0500 Subject: [PATCH] Revert "Revert "for #2196 now gruopby module invalidates host cached variables so they can be reevaluated with new groups"" This reverts commit dc0515a88a8aa78630f0b7118563c7a23c898839. We didn't need to revert this :) --- 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 e197a07fb1..5c2b7ece2b 100644 --- a/lib/ansible/runner/action_plugins/group_by.py +++ b/lib/ansible/runner/action_plugins/group_by.py @@ -71,6 +71,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)