Shell-quote environment contents

parent 27f3ba53
......@@ -228,10 +228,10 @@ class Runner(object):
return ""
enviro = utils.template(self.basedir, self.environment, inject)
if type(enviro) != dict:
raise errors.AnsibleError("environment must be a dictionary, recieved %s" % enviro)
raise errors.AnsibleError("environment must be a dictionary, received %s" % enviro)
result = ""
for (k,v) in enviro.iteritems():
result = "%s=%s %s" % (k, str(v), result)
result = "%s=%s %s" % (k, pipes.quote(str(v)), result)
return result
# *****************************************************
......
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