Commands · reference
config-weave apply
apply converges one play. It validates the playbook, runs the play's gatherers, then walks the step DAG. Each step's check runs first. A step that is NotConfigured gets its apply, and then check runs again to confirm the result. A step whose second check does not report AlreadyConfigured is an Error. See The convergence contract for the full lifecycle and Check, then apply for the recommended workflow.
Synopsis
config-weave apply [OPTIONS] <PLAYBOOK_DIR> <PLAY>
Arguments
| Argument | Meaning |
|---|---|
| PLAYBOOK_DIR | The playbook directory, containing playbook.wcl. |
| PLAY | The name of the play to apply. config-weave list shows the names. |
Options
All global options apply. The variable, password, worker pool, error and output options all take effect here.
| Option | Value | Meaning |
|---|---|---|
| --events-ndjson | Stream one JSON event per line to stderr: run and gather lifecycle plus per-step phase progress. Replaces the live progress line. Stdout still carries the final report, so combine with --json for a fully machine-readable run. | |
| --continue-on-error | Keep dispatching steps after an Error instead of halting once in-flight steps finish. | |
| --jobs | N | Worker pool size. See Scheduling and concurrency. |
Examples
Converge the baseline play.
config-weave apply ./my-playbook baseline
Apply with a variable override and a machine-readable report, then inspect the exit code.
config-weave apply ./my-playbook baseline --var hostname=web01 --json > report.json
echo $?
Apply a playbook that holds encrypted values, reading the password from a file, and log everything to NDJSON.
config-weave apply ./my-playbook baseline \
--password-file /run/secrets/weave \
--log-file /var/log/config-weave.ndjson --log-level debug
Exit status
0 when every step is Configured, Already Configured or Skipped. 1 when any step ended in Error, including a step whose apply succeeded but whose re-check disagreed. 2 when validation failed, a variable or password could not be resolved, or the play does not exist. 3 when a step returned RebootRequired and no step errored: the play halted, and running apply again after the reboot resumes it.