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>
This commit is contained in:
parent
d751d88b48
commit
6a1e2aaff5
2 changed files with 3 additions and 3 deletions
|
@ -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:]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#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
|
||||
|
|
Loading…
Reference in a new issue