From 715d875dcb9e7308be5b0c46b9160ce3f19e8db1 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Fri, 23 Nov 2012 00:51:36 +0100 Subject: [PATCH] Group should only return its own variables Otherwise, a host in two groups, A and B, using a variable defined in group A and all will get the value of all, as B's variables will include the all variable. Partially fixes #1647. --- lib/ansible/inventory/group.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/ansible/inventory/group.py b/lib/ansible/inventory/group.py index 80d72b17b50..a460b483efa 100644 --- a/lib/ansible/inventory/group.py +++ b/lib/ansible/inventory/group.py @@ -57,13 +57,7 @@ class Group(object): return list(hosts) def get_variables(self): - - vars = {} - # FIXME: verify this variable override order is what we want - for ancestor in self.get_ancestors(): - vars.update(ancestor.get_variables()) - vars.update(self.vars) - return vars + return self.vars.copy() def _get_ancestors(self):