mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Make default var lookup for tasks follow the dep chain
Related to #14296 (@jjshoe's follow-up example on that issue)
This commit is contained in:
parent
e11446490e
commit
f427955640
2 changed files with 5 additions and 2 deletions
|
@ -220,7 +220,7 @@ class VariableManager:
|
|||
# sure it sees its defaults above any other roles, as we previously
|
||||
# (v1) made sure each task had a copy of its roles default vars
|
||||
if task and task._role is not None:
|
||||
all_vars = combine_vars(all_vars, task._role.get_default_vars())
|
||||
all_vars = combine_vars(all_vars, task._role.get_default_vars(dep_chain=task._block._dep_chain))
|
||||
|
||||
if host:
|
||||
# next, if a host is specified, we load any vars from group_vars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue