From 75a9357e5e97b11b8cc3048afe8c0fcf30e4d606 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 9 Sep 2013 15:14:03 -0500 Subject: [PATCH] Fixing role variable precedence for top-level roles Fixes #4026 Fixes #3989 --- lib/ansible/playbook/play.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 4ebc1b6cb0..c11e8f05bd 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -164,7 +164,7 @@ class Play(object): raise errors.AnsibleError("too many levels of recursion while resolving role dependencies") for role in roles: 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_data = {} if os.path.isfile(vars):