Fix templating
This commit is contained in:
parent
753e744d17
commit
8aa9eda27e
@ -28,6 +28,7 @@ class ActionModule(ActionBase):
|
||||
|
||||
if task_vars is None:
|
||||
task_vars = dict()
|
||||
self.task_var = task_vars
|
||||
self.show_content = True
|
||||
self.included_files = []
|
||||
|
||||
@ -157,6 +158,10 @@ class ActionModule(ActionBase):
|
||||
failed = True
|
||||
err_msg = ('{0} must be stored as a dictionary/hash'.format(to_native(filename)))
|
||||
else:
|
||||
# Apply Ansible templating to the data
|
||||
templar = Templar(loader=self._loader, variables=self.task_var)
|
||||
data = templar.template(data)
|
||||
|
||||
self.included_files.append(filename)
|
||||
results.update(data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user