mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user