execute_on_group
Execute shell commands in parallel across all servers in a specified group, with controls for timeout, fail-fast, and dry-run previews.
Instructions
Execute a shell command on all servers in a group in parallel.
Concurrency is capped by the max_parallel_hosts setting (default 10;
configure in [settings] of servers.toml, range 1–100).
Args:
group: Group name (e.g. 'production', 'web'). Use list_groups to see
available groups.
command: Shell command to execute on every server in the group.
timeout: Per-server command timeout in seconds. Default 30.
Each server has its own timer; slow servers do NOT extend the
per-server limit for others.
working_dir: Absolute remote directory to cd into on each server.
Uses each server's default_dir if omitted.
fail_fast: If True, cancel remaining tasks as soon as any server
returns a non-zero exit code or errors. Default False —
run all servers to completion and report each result.
force: If True, bypass the dangerous-command detection regex. Use only
for audited bulk operations. Default False.
dry_run: If True, do NOT connect or execute anywhere. Return a
per-server preview describing what would run. Dangerous-
command detection still applies. Useful for previewing
fleet-wide rollouts before committing. Default False.
Returns: Formatted summary showing per-server results, success/failure counts, and aggregate exit status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| group | Yes | ||
| command | Yes | ||
| dry_run | No | ||
| timeout | No | ||
| fail_fast | No | ||
| working_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |