14
14
LOG = logging .getLogger ('puppetdb_stencil' )
15
15
16
16
METAPARAMS = ('require' , 'before' , 'subscribe' , 'notify' , 'audit' , 'loglevel' ,
17
- 'noop' , 'schedule' , 'stage' , 'alias' , 'tag' )
17
+ 'noop' , 'schedule' , 'stage' , 'alias' , 'tag' )
18
18
19
19
# Allow templates from anywhere on the filesystem
20
20
LOADER = jinja2 .FileSystemLoader (['.' , '/' ])
21
+ EXTENSIONS = ['jinja2.ext.with_' , 'jinja2.ext.loopcontrols' ]
21
22
ENVIRONMENT = jinja2 .Environment (trim_blocks = True , lstrip_blocks = True ,
22
- loader = LOADER ,
23
- extensions = ['jinja2.ext.with_' , 'jinja2.ext.loopcontrols' ])
23
+ loader = LOADER , extensions = EXTENSIONS )
24
24
25
25
26
26
def render_resources (database , resource_type , template_names ):
@@ -36,7 +36,7 @@ def render_resources(database, resource_type, template_names):
36
36
LOG .error ('No template found for {0}' .format (resource_type ))
37
37
else :
38
38
return template .render (resource_type = resource_type ,
39
- resources = resources , metaparams = METAPARAMS )
39
+ resources = resources , metaparams = METAPARAMS )
40
40
41
41
42
42
def main ():
0 commit comments