# elway — SSH playbook runner (CHANGING things) **Path:** `~/development/eshpfi-management/scripts/elway` (not on PATH) ```sh scripts/elway --playbook playbooks/.yaml ``` Write a playbook under `playbooks/` instead of chaining `ssh -t host 'sudo …'`. Handles sudo once lazily, gives structured pass/change/fail reporting, supports idempotency via `creates:` / `when:` / `changed_when:`, and does file upload. **Template:** `~/development/eshpfi-management/playbooks/elway-smoke.yaml` ## The split — pick by what you are doing | | tool | why | |---|---|---| | **CHANGING** something | `scripts/elway` | idempotency, sudo handling, file transfer, structured results | | **LOOKING at** something | `remote-ssh` MCP (Claude) or plain `ssh` | no ceremony; a persistent shell where `cd` and exports survive | Neither replaces the other. Reconnaissance — the `docker ps` / `grep` / `curl` questions — does not warrant authoring a playbook. ## Traps - **Deploys must converge, not accrete.** The staging directory must be OUTSIDE the rsync target; inside, it becomes a silently frozen source. Verify CONTENT, not liveness. - **`pkill -f ` over ssh kills your own shell** when the pattern matches your own argv (exit 255). Kill by explicit PID or pidfile. - **Never run destructive fs operations on a variable path.** `rm` / `shred` / `mv`-over take LITERAL paths, one per line. No loops, no variables.