def run(
self,
args: List[str],
user: str,
log_output_live: bool = False,
env: Optional[Dict] = None,
) -> CompletedProcess:
"""
Run a command on this node the given user.
Args:
args: The command to run on the node.
user: The username to SSH as.
log_output_live: If `True`, log output live. If `True`, stderr is
merged into stdout in the return value.
env: Environment variables to be set on the node before running
the command. A mapping of environment variable names to
values.
Returns:
The representation of the finished process.
Raises:
CalledProcessError: The process exited with a non-zero code.
"""
ssh_args = self._compose_ssh_command(args=args, user=user, env=env)
return run_subprocess(args=ssh_args, log_output_live=log_output_live)
评论列表
文章目录