mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
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
This commit is contained in:
@@ -334,7 +334,7 @@ class VariableManager:
|
||||
# vars (which will look at parent blocks/task includes)
|
||||
if task:
|
||||
if task._role:
|
||||
all_vars = combine_vars(all_vars, task._role.get_vars(include_params=False))
|
||||
all_vars = combine_vars(all_vars, task._role.get_vars(task._block._dep_chain, include_params=False))
|
||||
all_vars = combine_vars(all_vars, task.get_vars())
|
||||
|
||||
# next, we merge in the vars cache (include vars) and nonpersistent
|
||||
|
||||
Reference in New Issue
Block a user