mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-20 02:51:27 +00:00
[Update] 修改运行命令名称 (#2140)
This commit is contained in:
@@ -159,7 +159,7 @@ class CommandResultCallback(AdHocResultCallback):
|
||||
|
||||
def v2_playbook_on_play_start(self, play):
|
||||
now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
msg = '$ {} ({})'.format('echo', now)
|
||||
msg = '$ {} ({})'.format(play.name, now)
|
||||
self._play = play
|
||||
self._display.banner(msg)
|
||||
|
||||
|
@@ -250,7 +250,5 @@ class CommandRunner(AdHocRunner):
|
||||
tasks = [
|
||||
{"action": {"module": module, "args": cmd}}
|
||||
]
|
||||
hosts = self.inventory.get_hosts(pattern=pattern)
|
||||
name = "Run command {} on {}'s hosts".format(cmd, len(hosts))
|
||||
return self.run(tasks, pattern, play_name=name)
|
||||
return self.run(tasks, pattern, play_name=cmd)
|
||||
|
||||
|
Reference in New Issue
Block a user