Do not escape backslashes when using the template lookup plugin

This brings the lookup plugin inline with what the template module does.

Fixes #26397
This commit is contained in:
Toshio Kuratomi 2017-07-05 15:48:01 -07:00
parent 23041c3b6c
commit cf5fb0acdf

View file

@ -68,7 +68,8 @@ class LookupModule(LookupBase):
self._templar.set_available_variables(temp_vars)
# do the templating
res = self._templar.template(template_data, preserve_trailing_newlines=True, convert_data=convert_data_p)
res = self._templar.template(template_data, preserve_trailing_newlines=True,
convert_data=convert_data_p, escape_backslashes=False)
ret.append(res)
else:
raise AnsibleError("the template file %s could not be found for the lookup" % term)