Skip to content

Commit 783ef8d

Browse files
authored
Merge pull request #75 from jbondpdx/readme-plan
add running plans to README
2 parents 58fd26f + 9c2330a commit 783ef8d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ To execute a task, run `bolt task run`, specifying:
111111
* The full name of the task, formatted as `<MODULE::TASK>`, or as `<MODULE>` for `init` tasks.
112112
* Any task parameters, as `parameter=value`.
113113
* The nodes to run the task on and the protocol, if WinRM, with the `--nodes` flag.
114-
* The module path that contains the task, with the `--modules` flag.
114+
* The module path that contains the module containing the task, with the `--modules` flag.
115115
* If required, the username and password to connect to the node, with the `--username` and `--password` flags.
116116

117117

@@ -127,6 +127,24 @@ To run an `init` task, call the task by the module name only, and set the task p
127127
bolt run package action=status package=vim --nodes neptune --modules ~/modules
128128
```
129129

130+
## Running plans
131+
132+
Plans allow you to string several tasks together, and can include additional logic to trigger specific tasks.
133+
134+
To execute a plan, run `bolt plan run`, specifying:
135+
136+
* The full name of the plan, formatted as `<MODULE>::<PLAN>`.
137+
* Any plan parameters, as `parameter=value`.
138+
* The nodes to run the plan on and the protocol, if WinRM, as parameters to the plan: `parameters=value`. The `run plan` command ignores the `--nodes` flag.
139+
* The module path that contains the plan module, with the `--modules` flag.
140+
* If required, the username and password to connect to the node, with the `--username` and `--password` flags.
141+
142+
For example, if a plan defined in `mymodule/plans/myplan.pp` accepts a `load_balancer` parameter to specify a node on which to run tasks or functions in the plan, run:
143+
144+
```
145+
bolt plan run mymodule::myplan --modules ./PATH/TO/MODULES load_balancer=lb.myorg.com​
146+
```
147+
130148
### Specifying the module path
131149

132150
When executing tasks or plans, you must specify the `--modules` option as the directory containing the module. Specify this option in the format `--modules /path/to/modules`, should correspond to a directory structure:

docs/writing_tasks_and_plans.pdf

132 KB
Binary file not shown.

0 commit comments

Comments
 (0)