cmd¶
Execute commands directly without shell interpolation
Properties¶
| Property | Type | Required | Description |
|---|---|---|---|
argv |
array | Yes | - |
capture |
boolean | No | - |
stdin |
string | No | - |
Examples¶
# Run a command and capture stdout for a later step
- name: Probe the API version
cmd:
argv: [curl, -fsSL, "https://api.example.com/version"]
as: api_version
- name: Echo what we got
log:
msg: "api version = {{ api_version.stdout }}"
# Silence the captured buffer for noisy commands; output still streams
- name: Run a long build
cmd:
argv: [make, build]
capture: false
Platform Support¶
linux, darwin, windows, freebsd
Events Emitted¶
step.stdoutstep.stderr