Rejoin args list into a string for run_command when using an unsafe shell
This allows the use of an args list with leading environment variables, which otherwise would fail due to the way Popen works.pull/4420/head
parent
5233d4bc31
commit
677008bef7
|
@ -1009,7 +1009,9 @@ class AnsibleModule(object):
|
|||
|
||||
shell = False
|
||||
if isinstance(args, list):
|
||||
pass
|
||||
if use_unsafe_shell:
|
||||
args = " ".join([pipes.quote(x) for x in args])
|
||||
shell = True
|
||||
elif isinstance(args, basestring) and use_unsafe_shell:
|
||||
shell = True
|
||||
elif isinstance(args, basestring):
|
||||
|
|
Loading…
Reference in New Issue