Commands · reference

config-weave apply

3 min read · 2026-09-02 · config-weave 0.1.0

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

console
config-weave apply [OPTIONS] <PLAYBOOK_DIR> <PLAY>

Arguments

ArgumentMeaning
PLAYBOOK_DIRThe playbook directory, containing playbook.wcl.
PLAYThe 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.

OptionValueMeaning
--events-ndjsonStream 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-errorKeep dispatching steps after an Error instead of halting once in-flight steps finish.
--jobsNWorker pool size. See Scheduling and concurrency.

Examples

Converge the baseline play.

console
config-weave apply ./my-playbook baseline

Apply with a variable override and a machine-readable report, then inspect the exit code.

console
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.

console
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.