mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Force command action to not be executed by the shell unless specifically enabled
This commit is contained in:
parent
9730157525
commit
ba0fec4f42
19 changed files with 427 additions and 245 deletions
|
@ -32,7 +32,7 @@ class LookupModule(object):
|
|||
|
||||
ret = []
|
||||
for term in terms:
|
||||
p = subprocess.Popen(term, cwd=self.basedir, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
p = subprocess.Popen(term, cwd=self.basedir, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode == 0:
|
||||
ret.append(stdout.decode("utf-8").rstrip())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue