From 07e5e98cbfff5ffdd15d0f1006e045fca5e491e4 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 30 Jul 2015 16:52:44 -0400 Subject: [PATCH] removed jinaj2 override restrictions --- lib/ansible/template/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index 6bcade22154..8d0a8730456 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -47,7 +47,6 @@ __all__ = ['Templar'] NON_TEMPLATED_TYPES = ( bool, Number ) JINJA2_OVERRIDE = '#jinja2:' -JINJA2_ALLOWED_OVERRIDES = frozenset(['trim_blocks', 'lstrip_blocks', 'newline_sequence', 'keep_trailing_newline']) class Templar: ''' @@ -279,7 +278,6 @@ class Templar: if overrides is None: myenv = self.environment.overlay() else: - overrides = JINJA2_ALLOWED_OVERRIDES.intersection(set(overrides)) myenv = self.environment.overlay(overrides) # Get jinja env overrides from template @@ -290,8 +288,7 @@ class Templar: for pair in line.split(','): (key,val) = pair.split(':') key = key.strip() - if key in JINJA2_ALLOWED_OVERRIDES: - setattr(myenv, key, ast.literal_eval(val.strip())) + setattr(myenv, key, ast.literal_eval(val.strip())) #FIXME: add tests myenv.filters.update(self._get_filters())