Do not include params when getting role vars in certain situations

In VariableManager, we fetch the params specifically in the next step,
so including them in the prior step is unnecessary and could lead to things
being overridden in an improper order.

In Block, we should not be getting the params for the role as they are
included earlier via the VariableManager.

Fixes #14411
pull/15949/head
James Cammarata 10 years ago
parent 2a512affde
commit 3a052654f3

@ -66,7 +66,7 @@ class Block(Base, Become, Conditional, Taggable):
all_vars = self.vars.copy()
if self._role:
all_vars.update(self._role.get_vars(self._dep_chain))
all_vars.update(self._role.get_vars(self._dep_chain, include_params=False))
if self._parent_block:
all_vars.update(self._parent_block.get_vars())
if self._task_include:

@ -324,7 +324,7 @@ class VariableManager:
if task:
if task._role:
all_vars = combine_vars(all_vars, task._role.get_vars())
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.get_vars())

Loading…
Cancel
Save