mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 16:53:11 +00:00
Don't assign both parent blocks and task includes to blocks
This causes problems when fetching parent attributes, as the include was being skipped because the parent block would fetch the attribute from the parent play first. Fixes #13872
This commit is contained in:
@@ -44,12 +44,17 @@ class Block(Base, Become, Conditional, Taggable):
|
||||
def __init__(self, play=None, parent_block=None, role=None, task_include=None, use_handlers=False, implicit=False):
|
||||
self._play = play
|
||||
self._role = role
|
||||
self._task_include = task_include
|
||||
self._parent_block = parent_block
|
||||
self._task_include = None
|
||||
self._parent_block = None
|
||||
self._use_handlers = use_handlers
|
||||
self._implicit = implicit
|
||||
self._dep_chain = []
|
||||
|
||||
if task_include:
|
||||
self._task_include = task_include
|
||||
elif parent_block:
|
||||
self._parent_block = parent_block
|
||||
|
||||
super(Block, self).__init__()
|
||||
|
||||
def get_vars(self):
|
||||
|
||||
Reference in New Issue
Block a user