Shell-quote environment contents

parent 27f3ba53
...@@ -228,10 +228,10 @@ class Runner(object): ...@@ -228,10 +228,10 @@ class Runner(object):
return "" return ""
enviro = utils.template(self.basedir, self.environment, inject) enviro = utils.template(self.basedir, self.environment, inject)
if type(enviro) != dict: 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 = "" result = ""
for (k,v) in enviro.iteritems(): 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 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