|
|
@ -592,6 +592,7 @@ class AnsibleEnvironment(NativeEnvironment):
|
|
|
|
if not C.JINJA2_BYTECODE_CACHE:
|
|
|
|
if not C.JINJA2_BYTECODE_CACHE:
|
|
|
|
return super().compile(source, name=name, filename=filename, raw=raw, defer_init=defer_init) # type: ignore[call-overload]
|
|
|
|
return super().compile(source, name=name, filename=filename, raw=raw, defer_init=defer_init) # type: ignore[call-overload]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
# Environment._parse
|
|
|
|
# Environment._parse
|
|
|
|
parsed = Parser(self, source, name, filename).parse()
|
|
|
|
parsed = Parser(self, source, name, filename).parse()
|
|
|
|
|
|
|
|
|
|
|
@ -610,7 +611,12 @@ class AnsibleEnvironment(NativeEnvironment):
|
|
|
|
optimized=self.optimized,
|
|
|
|
optimized=self.optimized,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if raw:
|
|
|
|
|
|
|
|
return generated
|
|
|
|
|
|
|
|
|
|
|
|
return compile(generated, filename or '<template>', 'exec')
|
|
|
|
return compile(generated, filename or '<template>', 'exec')
|
|
|
|
|
|
|
|
except TemplateSyntaxError:
|
|
|
|
|
|
|
|
self.handle_exception(source=source)
|
|
|
|
|
|
|
|
|
|
|
|
def from_string(
|
|
|
|
def from_string(
|
|
|
|
self,
|
|
|
|
self,
|
|
|
|