From 19a58859d6ed96f9b68db94094795b532edb350c Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 9 Dec 2021 17:29:38 +0100 Subject: [PATCH] AnsibleJ2Template should be based on NativeTemplate (#76471) Fixes #76442 ci_complete --- lib/ansible/template/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/template/template.py b/lib/ansible/template/template.py index 3e7738bf7d7..5eb66da6bea 100644 --- a/lib/ansible/template/template.py +++ b/lib/ansible/template/template.py @@ -19,12 +19,12 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import jinja2 +from jinja2.nativetypes import NativeTemplate __all__ = ['AnsibleJ2Template'] -class AnsibleJ2Template(jinja2.environment.Template): +class AnsibleJ2Template(NativeTemplate): ''' A helper class, which prevents Jinja2 from running AnsibleJ2Vars through dict(). Without this, {% include %} and similar will create new contexts unlike the special