ssh_run_playbook
Executes a multi-step playbook on a remote host, stops on the first non-zero exit code, and returns a transcript of every step that ran.
Instructions
Execute a multi-step playbook on a remote host. The 'content' field is a multi-line string. Supports structured format with directives: '# @section "Title"' to group steps into sections, '# @desc "description"' for section description, '# @note "text"' for step notes, '# @danger "text"' for danger warnings, and '# @on "command"' for interactive commands (replaces legacy 'expect:'/'answer:' syntax). Legacy format (one command per line with optional 'expect:'/'answer:' pairs) is also supported. Stops on the first non-zero exit code and returns the transcript of every step that ran. Call host_list first — it returns the uid of every host, and that value is what host_id expects. The model must use host_id only; credentials are resolved server-side. The model MUST supply timeout_seconds (1-600) — it is the budget for the WHOLE playbook, each step only gets the time that is left.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Multi-line playbook body. Supports structured directives (# @section, # @desc, # @note, # @danger, # @on) or legacy expect:/answer: pairs. | |
| host_id | Yes | Identifier of an existing host: the exact `uid` value returned by `host_list`. Call `host_list` first and pass that value unchanged. | |
| timeout_seconds | Yes | Hard timeout in seconds. REQUIRED. The model must estimate an appropriate timeout based on the command's complexity (1-600 seconds). The command is terminated when the timeout expires. |