Browse code

Fix bug where getting role vars does not follow the dep chain

This bug was introduced in 3ced6d3, where getting vars from a role
did not follow the dep chain. This was originally hidden by the fact
that we got vars twice (from the block and from the roles directly).

Fixes #16729

(cherry picked from commit d8a3feb976d69dbe4c87ce239387fd50936e5061)

James Cammarata authored on 2016/07/20 05:59:11
Showing 1 changed files
... ...
@@ -334,7 +334,7 @@ class VariableManager:
334 334
         # vars (which will look at parent blocks/task includes)
335 335
         if task:
336 336
             if task._role:
337
-                all_vars = combine_vars(all_vars, task._role.get_vars(include_params=False))
337
+                all_vars = combine_vars(all_vars, task._role.get_vars(task._block._dep_chain, include_params=False))
338 338
             all_vars = combine_vars(all_vars, task.get_vars())
339 339
 
340 340
         # next, we merge in the vars cache (include vars) and nonpersistent