From 581a0c9f59f25184e59cc77a3a090632790a1eee Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 1 Aug 2013 21:08:23 -0400 Subject: [PATCH] now correctly 'types' value pairs that are passed as options to jinja override Signed-off-by: Brian Coca --- lib/ansible/utils/template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index f1f2bb9c8c3..bcb2e0b69d9 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -28,6 +28,7 @@ import time import subprocess import datetime import pwd +import ast class Globals(object): @@ -435,7 +436,7 @@ def template_from_file(basedir, path, vars): data = data[eol+1:] for pair in line.split(','): (key,val) = pair.split(':') - setattr(environment,key.strip(),val.strip()) + setattr(environment,key.strip(),ast.literal_eval(val.strip())) environment.template_class = J2Template t = environment.from_string(data)