winch plan
show the changes that apply would make
Examples
# show the changes of the pipeline site
winch plan site# use the inventory production
winch plan site --inventory production# plan with a value for one variable
winch plan site --set vars.nginx_port=8080# plan two stages on the web hosts without web3
winch plan site --hosts 'web & !web3' --stages nginx,site# exit with code 2 when apply would change something
winch plan site --exit-codeUsage
winch plan [<pipeline>] [flags]Plan shows the changes that winch apply would make, and the plan hash. It changes nothing.
Leave out the pipeline name when the steps are at the top of winch.yaml.
A host pattern is a group or a host, with "," for union, "&" for intersection, and "!" for exclusion. Each stage runs on the hosts in both its hosts and --hosts. The stages of --stages run in pipeline order.
A --set value parses as YAML.
With a terminal, ssh can ask questions, and winch connects to the hosts one at a time. Without one, or with --batch, ssh asks nothing, and winch connects to them in parallel.
With --exit-code, plan exits with code 2 when the plan has changes, unknown steps, pending handlers, a pending then, or a pending gate or assert.
Flags
| Flag | Value | Default | Meaning |
|---|---|---|---|
--inventory | <name> | inventory in winch.yaml | inventory for the run |
--hosts | <pattern> | all | only these hosts |
--stages | <names> | all | only these stages, such as mail,monit |
--user | [<host>=]<name> | from the inventory | SSH login user, for all hosts or one; repeatable |
--set | vars.<name>=<value> | variable value; repeatable | |
--batch | no questions from ssh | ||
--exit-code | exit code 2 for a plan with changes | ||
--json | JSON events on stdout |
See
winch doc workflowwinch doc pipelinewinch doc inventory