1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixing role variable precedence for top-level roles

Fixes #4026
Fixes #3989
This commit is contained in:
James Cammarata 2013-09-09 15:14:03 -05:00
parent 294451d002
commit 75a9357e5e

View file

@ -164,7 +164,7 @@ class Play(object):
raise errors.AnsibleError("too many levels of recursion while resolving role dependencies") raise errors.AnsibleError("too many levels of recursion while resolving role dependencies")
for role in roles: for role in roles:
role_path,role_vars = self._get_role_path(role) role_path,role_vars = self._get_role_path(role)
role_vars = utils.combine_vars(role_vars, passed_vars) role_vars = utils.combine_vars(passed_vars, role_vars)
vars = self._resolve_main(utils.path_dwim(self.basedir, os.path.join(role_path, 'vars'))) vars = self._resolve_main(utils.path_dwim(self.basedir, os.path.join(role_path, 'vars')))
vars_data = {} vars_data = {}
if os.path.isfile(vars): if os.path.isfile(vars):