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

Shell-quote environment contents

This commit is contained in:
Daniel Hokka Zakrisson 2013-02-25 22:31:49 +01:00
parent 27f3ba53f9
commit e32fbd312f

View file

@ -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
# *****************************************************