1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

now correctly 'types' value pairs that are passed as options to jinja

override
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca 2013-08-01 21:08:23 -04:00
parent 0335d05f43
commit 581a0c9f59

View file

@ -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)