mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 14:21:06 -07:00
always template when called from template (#18490)
* Have template action plugin call do_template Avoids all the magic done for 'inline templating' for ansible plays. renamed _do_template to do_template in templar to make externally accessible. fixes #18192 * added backwards compat as per feedback
This commit is contained in:
parent
fcb033b9e4
commit
bd70397e24
2 changed files with 6 additions and 3 deletions
|
@ -127,7 +127,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
old_vars = self._templar._available_variables
|
||||
self._templar.set_available_variables(temp_vars)
|
||||
resultant = self._templar.template(template_data, preserve_trailing_newlines=True, escape_backslashes=False, convert_data=False)
|
||||
resultant = self._templar.do_template(template_data, preserve_trailing_newlines=True, escape_backslashes=False)
|
||||
self._templar.set_available_variables(old_vars)
|
||||
except Exception as e:
|
||||
result['failed'] = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue