批量命令支持更广泛的设备如思科等网络设备,docker等 (#6356)

* feat: Update README (#6182)

* feat: Update README

* feat: Update README

* Update README.md

* feat: update README

* Update README.md

* docs: 修改英文版本

* Update README.md

* 批量命令支持更广泛的设备如思科等网络设备,docker等

Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
Co-authored-by: 老广 <ibuler@qq.com>
This commit is contained in:
Z000000
2021-07-08 14:32:03 +08:00
committed by GitHub
parent ec8dca90d6
commit c532c361c0
4 changed files with 72 additions and 503 deletions

View File

@@ -250,7 +250,7 @@ class CommandRunner(AdHocRunner):
results_callback_class = CommandResultCallback
modules_choices = ('shell', 'raw', 'command', 'script', 'win_shell')
def execute(self, cmd, pattern, module='shell'):
def execute(self, cmd, pattern, module='raw'):
if module and module not in self.modules_choices:
raise AnsibleError("Module should in {}".format(self.modules_choices))

View File

@@ -87,7 +87,7 @@ class CommandExecution(OrgModelMixin):
if host and host.is_windows():
shell = 'win_shell'
else:
shell = 'shell'
shell = 'raw'
result = runner.execute(self.command, 'all', module=shell)
self.result = result.results_command
except SoftTimeLimitExceeded as e: