You can clone with
HTTPS or Subversion.
group.py incorrectly calculates group depth. This can cause groups on different levels to have the same depth. In turn this can result in reading the files under 'group_vars/' in the wrong order which means that a higher level group can overwrite a lower level group variable.
Here's the fix for group.py:
diff --git a/lib/ansible/inventory/group.py b/lib/ansible/inventory/group.py
index a460b48..88231a4 100644
@@ -36,7 +36,10 @@ class Group(object):
if self == group:
raise Exception("can't add group to itself")
- group.depth = group.depth + 1
+ group.depth = self.depth + 1
def add_host(self, host):
Hi @zsolt-erl can you submit this as a pull request?
I'd like to include attribution to you in the source.
See https://help.github.com/articles/using-pull-requests if you need help!
Note that it should be max([group.depth, self.depth + 1]) to get the correct value.
Committed 0ad6ac4 per @dhozac's suggestion