Commit 1d4b9647 by Brian Coca

dont break everything when one of the vars in inject does not template…

dont break everything when one of the vars  in inject does not template correctly, wait till its used
parent 81e4a74c
...@@ -188,7 +188,11 @@ class _jinja2_vars(object): ...@@ -188,7 +188,11 @@ class _jinja2_vars(object):
if isinstance(var, dict) and varname == "vars" or isinstance(var, HostVars): if isinstance(var, dict) and varname == "vars" or isinstance(var, HostVars):
return var return var
else: else:
return template(self.basedir, var, self.vars, fail_on_undefined=self.fail_on_undefined) try:
return template(self.basedir, var, self.vars, fail_on_undefined=self.fail_on_undefined)
except:
raise KeyError("undefined variable: %s" % varname)
def add_locals(self, locals): def add_locals(self, locals):
''' '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment