mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #15745 playbook include: Conditional scoping
Fixes #15745 Applies conditional forwarding to all tasks/roles within the included playbook. The existing line only applies forwarded conditionals to the main Task block, and misses pre_, post_, and roles. Typo :: Made a selection mistake when I copied over the one line change
This commit is contained in:
parent
e33b97ed1f
commit
fefd87c61a
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ class PlaybookInclude(Base, Conditional, Taggable):
|
||||||
# plays. If so, we can take a shortcut here and simply prepend them to
|
# plays. If so, we can take a shortcut here and simply prepend them to
|
||||||
# those attached to each block (if any)
|
# those attached to each block (if any)
|
||||||
if forward_conditional:
|
if forward_conditional:
|
||||||
for task_block in entry.tasks:
|
for task_block in entry.pre_tasks + entry.roles + entry.tasks + entry.post_tasks:
|
||||||
task_block.when = self.when[:] + task_block.when
|
task_block.when = self.when[:] + task_block.when
|
||||||
|
|
||||||
return pb
|
return pb
|
||||||
|
|
Loading…
Reference in a new issue