diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index 66b816df96..e1f569abd2 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -232,7 +232,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._dep_chain)) + all_vars = combine_vars(all_vars, task._role.get_default_vars(dep_chain=task._block.get_dep_chain())) if host: # next, if a host is specified, we load any vars from group_vars @@ -325,7 +325,7 @@ class VariableManager: 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_role_params(task._block._dep_chain)) + all_vars = combine_vars(all_vars, task._role.get_role_params(task._block.get_dep_chain())) all_vars = combine_vars(all_vars, task.get_vars()) if host: