Correctly handle variable issues when evaluating jinja2 when statements

Fixes #4025
This commit is contained in:
James Cammarata 2013-09-09 14:50:21 -05:00
commit 294451d002
2 changed files with 14 additions and 3 deletions

View file

@ -430,7 +430,7 @@ def template_from_file(basedir, path, vars):
raise errors.AnsibleError("unable to read %s" % realpath)
# Get jinja env overrides from template
# Get jinja env overrides from template
if data.startswith(JINJA2_OVERRIDE):
eol = data.find('\n')
line = data[len(JINJA2_OVERRIDE):eol]