modules/terraform: Quote the variable values in the command line (#43493)

* modules/terraform: Quote the variable values in the command line

Fixes: #43492

* fix six import
This commit is contained in:
Rémi REY 2018-08-27 20:38:21 +02:00 committed by Ryan Brown
parent 397febd343
commit 26be68dd1c

View file

@ -145,6 +145,7 @@ import os
import json
import tempfile
import traceback
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils.basic import AnsibleModule
@ -296,7 +297,7 @@ def main():
for k, v in variables.items():
variables_args.extend([
'-var',
'{0}={1}'.format(k, v)
shlex_quote('{0}={1}'.format(k, v))
])
if variables_file:
variables_args.extend(['-var-file', variables_file])