mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 23:51:23 -07:00
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:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue