summaryrefslogtreecommitdiff
path: root/lib/ansible/vars/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/vars/__init__.py')
-rw-r--r--lib/ansible/vars/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py
index 686bd31b01..4975839d6b 100644
--- a/lib/ansible/vars/__init__.py
+++ b/lib/ansible/vars/__init__.py
@@ -237,7 +237,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(dep_chain=task._block.get_dep_chain()))
+ all_vars = combine_vars(all_vars, task._role.get_default_vars(dep_chain=task.get_dep_chain()))
if host:
# next, if a host is specified, we load any vars from group_vars
@@ -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(task._block._dep_chain, include_params=False))
+ all_vars = combine_vars(all_vars, task._role.get_vars(task.get_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
@@ -346,7 +346,7 @@ class VariableManager:
# next, we merge in role params and task include params
if task:
if task._role:
- all_vars = combine_vars(all_vars, task._role.get_role_params(task._block.get_dep_chain()))
+ all_vars = combine_vars(all_vars, task._role.get_role_params(task.get_dep_chain()))
# special case for include tasks, where the include params
# may be specified in the vars field for the task, which should