ssh_job_status
Retrieve exit code and last output lines of a detached SSH job to see its current status.
Instructions
Reports the state of a detached job, with the last lines it wrote so you can see where it got to. lost = no exit code, but ssh_job_output still has the output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Job id returned by ssh_exec with detach: true. A job started with sudo is reached as root from the id alone — nothing extra to pass. | |
| profile | Yes | Machine name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | No | ||
| legend | No | What the words in this answer mean. A key names the field before the value — "state=limited", "jobs[].state=lost" — and only the values this answer actually used are listed. |