mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Warn about falling back to jinja2_native=false (#49063)
This commit is contained in:
parent
67a70a1205
commit
abdf46803b
2 changed files with 7 additions and 0 deletions
2
changelogs/fragments/jinja2_native-fallback-warning.yaml
Normal file
2
changelogs/fragments/jinja2_native-fallback-warning.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- Add warning about falling back to jinja2_native=false when Jinja2 version is lower than 2.10.
|
|
@ -74,6 +74,11 @@ if C.DEFAULT_JINJA2_NATIVE:
|
|||
except ImportError:
|
||||
from jinja2 import Environment
|
||||
from jinja2.utils import concat as j2_concat
|
||||
from jinja2 import __version__ as j2_version
|
||||
display.warning(
|
||||
'jinja2_native requires Jinja 2.10 and above. '
|
||||
'Version detected: %s. Falling back to default.' % j2_version
|
||||
)
|
||||
else:
|
||||
from jinja2 import Environment
|
||||
from jinja2.utils import concat as j2_concat
|
||||
|
|
Loading…
Reference in a new issue