xops play
Command usage and available options are listed below. Check --help for options supported by your installed version.
text
Load and execute declarative orchestration tasks (Playbook) from a YAML file.
Supports sequential multi-step and parallel multi-host execution. Step types:
shell — Run a command on remote hosts
script — Upload and execute a local script file
copy — Upload a local file to remote hosts
ensure — Idempotent state convergence: check first, run action if not satisfied
template — Render a Go template and upload
Examples:
xops play deploy.yaml
xops play deploy.yaml --var version=2.1.0 --var env=prod
xops play deploy.yaml --concurrency 5
xops play deploy.yaml --dry-run
xops play deploy.yaml --limit web-1,web-2
xops play deploy # look up by name under ~/.xops/playbooks/
Usage:
xops play <playbook-file> [flags]
Flags:
-j, --concurrency uint Maximum concurrent hosts (overrides Playbook settings.concurrency)
--dry-run Parse and preview Playbook steps without executing
-h, --help help for play
--limit string Limit target nodes (comma-separated node names, overrides Playbook targets)
--sudo Force global sudo (overrides Playbook settings.sudo)
--var stringArray Override or add a variable, format: key=value (repeatable)
Global Flags:
--color string ANSI color output (auto=detect pipe/redirect, never=disable, always=force enable)
--debug Enable debug mode (equivalent to --log-level=debug)
--lang string Interface language (zh/en)
--log-level string Set internal diagnostic log level (debug, info, warn, error)