mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fixing bug related to dynamic includes + with* loops
This commit is contained in:
@@ -209,6 +209,7 @@ class StrategyModule(StrategyBase):
|
|||||||
results = self._wait_on_pending_results(iterator)
|
results = self._wait_on_pending_results(iterator)
|
||||||
host_results.extend(results)
|
host_results.extend(results)
|
||||||
|
|
||||||
|
# FIXME: this needs to be somewhere else
|
||||||
class IncludedFile:
|
class IncludedFile:
|
||||||
def __init__(self, filename, args, task):
|
def __init__(self, filename, args, task):
|
||||||
self._filename = filename
|
self._filename = filename
|
||||||
@@ -239,6 +240,8 @@ class StrategyModule(StrategyBase):
|
|||||||
include_file = self._loader.path_dwim(res._task.args.get('_raw_params'))
|
include_file = self._loader.path_dwim(res._task.args.get('_raw_params'))
|
||||||
|
|
||||||
include_variables = include_result.get('include_variables', dict())
|
include_variables = include_result.get('include_variables', dict())
|
||||||
|
if 'item' in include_result:
|
||||||
|
include_variables['item'] = include_result['item']
|
||||||
|
|
||||||
inc_file = IncludedFile(include_file, include_variables, original_task)
|
inc_file = IncludedFile(include_file, include_variables, original_task)
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@
|
|||||||
- include: include.yml a=always
|
- include: include.yml a=always
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: foo
|
#- name: foo
|
||||||
include: include.yml a="this is a handler"
|
# include: include.yml a="this is a handler"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user