Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060)

pull/47099/head
Matt Martz 6 years ago committed by GitHub
parent 38eba60849
commit c3d5779a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- dynamic includes - Use the copied and merged task for calculating task vars in the free strategy (https://github.com/ansible/ansible/issues/47024)

@ -239,7 +239,7 @@ class StrategyModule(StrategyBase):
continue continue
for new_block in new_blocks: for new_block in new_blocks:
task_vars = self._variable_manager.get_vars(play=iterator._play, task=included_file._task) task_vars = self._variable_manager.get_vars(play=iterator._play, task=new_block._parent)
final_block = new_block.filter_tagged_tasks(play_context, task_vars) final_block = new_block.filter_tagged_tasks(play_context, task_vars)
for host in hosts_left: for host in hosts_left:
if host in included_file._hosts: if host in included_file._hosts:

Loading…
Cancel
Save