mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Shell-quote environment contents
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user