Commit 6a1e2aaf by Brian Coca Committed by Brian Coca

moved override matching string to variable changed test template to match…

moved override matching string to variable changed test template to match Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
parent d751d88b
......@@ -31,7 +31,7 @@ import pwd
# TODO: refactor this file
_LISTRE = re.compile(r"(\w+)\[(\d+)\]")
JINJA2_OVERRIDE='#jinja2:'
def _varFindLimitSpace(basedir, vars, space, part, depth):
''' limits the search space of space to part
......@@ -277,7 +277,7 @@ def template_from_file(basedir, path, vars):
raise errors.AnsibleError("unable to read %s" % realpath)
# Get jinja env overrides from template
if data.startswith('#env:'):
if data.startswith(JINJA2_OVERRIDE):
eol = data.find('\n')
line = data[5:eol]
data = data[eol+1:]
......
#env: variable_end_string: @@, variable_start_string: @@
#jinja2: variable_end_string: @@, variable_start_string: @@
{% raw %}
if this succeeds you should see '{{ ansible_hostname }}' with the hostname on the line above
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment