fix: make Jinja3 work

This commit is contained in:
Stefan Reimer 2022-01-24 12:01:50 +01:00
parent 0a4c5ba6ed
commit 160250369b
2 changed files with 4 additions and 0 deletions

View File

@ -156,8 +156,10 @@ def inline_yaml(block):
def JinjaEnv(template_locations=[]):
LoggingUndefined = jinja2.make_logging_undefined(logger=logger, base=Undefined)
jenv = jinja2.Environment(trim_blocks=True,
lstrip_blocks=True,
undefined=LoggingUndefined,
extensions=['jinja2.ext.loopcontrols', 'jinja2.ext.do'])
if template_locations:

View File

@ -166,6 +166,8 @@ class Stack(object):
Description: Project / Namespace this stack is part of
"""
self.cfn_template = re.sub(_res, '', self.cfn_template)
else:
self.dependencies.add("CloudBender")
include = []
search_refs(self.cfn_data, include, self.mode)