From 9ac25bb8f6e04e9e7e725e400573ac5973aaad2e Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 10 Apr 2013 18:19:31 -0400 Subject: [PATCH] Minor formatting --- lib/ansible/utils/template.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index b49ab32d26..c339df8ac0 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -382,12 +382,14 @@ def template_from_file(basedir, path, vars): managed_default = C.DEFAULT_MANAGED_STR managed_str = managed_default.format( - host = vars['template_host'], - uid = vars['template_uid'], - file = vars['template_path'] - ) - vars['ansible_managed'] = time.strftime(managed_str, - time.localtime(os.path.getmtime(realpath))) + host = vars['template_host'], + uid = vars['template_uid'], + file = vars['template_path'] + ) + vars['ansible_managed'] = time.strftime( + managed_str, + time.localtime(os.path.getmtime(realpath)) + ) # This line performs deep Jinja2 magic that uses the _jinja2_vars object for vars # Ideally, this could use some API where setting shared=True and the object won't get @@ -399,6 +401,7 @@ def template_from_file(basedir, path, vars): return template(basedir, res, vars) def _get_filter_plugins(): + global FILTER_PLUGINS if FILTER_PLUGINS is not None: return FILTER_PLUGINS