winch apply
make the changes after you approve the plan
Examples
# plan the pipeline site, ask, and make the changes
winch apply site# apply on the test inventory without the question
winch apply site --inventory test --yes# apply the stage mail on the mail hosts
winch apply site --hosts mail --stages mail# apply only the plan that you checked before
winch apply site --check a3f9c2e1d07b4c58Usage
winch apply [<pipeline>] [flags]Apply shows the plan of a pipeline, asks the question "Apply these changes?", and then makes the changes.
Leave out the pipeline name when the steps are at the top of winch.yaml.
winch asks only when stdin and stderr are terminals. Without a terminal, and without --yes or --check, apply prints the plan and exits with code 5. Its last line is the command that applies the plan with its hash.
--check replaces the question. When the new plan has another hash, apply exits with code 6 and changes nothing.
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. The apply question stays.
The first Ctrl-C lets the running step on each host finish and starts no new step. A second Ctrl-C ends the sessions at once.
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 | ||
--yes | no apply question | ||
--check | <hash> | plan hash that the apply needs | |
--json | JSON events on stdout |
See
winch doc workflowwinch doc pipelinewinch doc inventory