summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/action/template.py
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2016-11-15 15:16:46 -0500
committerBrian Coca <brian.coca+git@gmail.com>2016-11-15 15:17:06 -0500
commit42fb088807a3052524698a643f22c3e04c35d960 (patch)
tree6f18498bd84367579351f743ba43b29661dfe2ce /lib/ansible/plugins/action/template.py
parent7602a2a030b73063368de3d627fcdad47a860e8f (diff)
downloadansible-42fb088807a3052524698a643f22c3e04c35d960.tar.gz
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 (cherry picked from commit bd70397e246e4a1d9d892964e5d66a452c08a676)
Diffstat (limited to 'lib/ansible/plugins/action/template.py')
-rw-r--r--lib/ansible/plugins/action/template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/plugins/action/template.py b/lib/ansible/plugins/action/template.py
index 488b53ba38..34f452f7a3 100644
--- a/lib/ansible/plugins/action/template.py
+++ b/lib/ansible/plugins/action/template.py
@@ -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