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