perf: 优化ansible执行命令

This commit is contained in:
ibuler
2021-07-08 14:36:18 +08:00
committed by Jiangjie.Bai
parent 1e601288fa
commit 10f8b9f130
2 changed files with 3 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ class CommandExecution(OrgModelMixin):
host = self.hosts.first()
if host and host.is_windows():
shell = 'win_shell'
elif host and host.is_unixlike():
shell = 'shell'
else:
shell = 'raw'
result = runner.execute(self.command, 'all', module=shell)