Do not escape backslashes when using the template lookup plugin

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

Fixes #26397
pull/26469/head
Toshio Kuratomi 7 years ago
parent 23041c3b6c
commit cf5fb0acdf

@ -68,7 +68,8 @@ class LookupModule(LookupBase):
self._templar.set_available_variables(temp_vars) self._templar.set_available_variables(temp_vars)
# do the templating # 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) ret.append(res)
else: else:
raise AnsibleError("the template file %s could not be found for the lookup" % term) raise AnsibleError("the template file %s could not be found for the lookup" % term)

Loading…
Cancel
Save