Skip to content

Commit

Permalink
Do not escape backslashes when using the template lookup plugin
Browse files Browse the repository at this point in the history
This brings the lookup plugin inline with what the template module does.

Fixes ansible#26397
  • Loading branch information
abadger committed Jul 5, 2017
1 parent ef7f56c commit 411b155
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/plugins/lookup/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def run(self, terms, variables, **kwargs):
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)
Expand Down

0 comments on commit 411b155

Please sign in to comment.