Running plans from the command line

Run a plan using the puppet plan run command.

On the command line, run the command puppet plan run with the following information included:

  • The full name of the plan, formatted as <MODULE>::<PLAN>.
  • Any plan parameters.
    To find out what parameters can be included in a plan, view the plan metadata by running the command puppet plan show <PLAN NAME> on the command line. For more information, see Inspecting plans
  • Credentials, if required, formatted with the --user and --password flags.

For example, if a plan defined in mymodule/plans/myplan.pp accepts a load_balancer parameter, run:

puppet plan run mymodule::myplan load_balancer=lb.myorg.com

You can pass a comma-separated list of node names, wildcard patterns, or group IDs to a plan parameter that is passed to a run function or that the plan resolves using get_targets.

What to do next

If you need to stop an in-progress plan, click Stop Plan on the plan's run details page in the console or use the POST /command/stop_plan endpoint. This prevents new events from starting and allows in-progress events to finish. If you need to force stop an in-progress task from a stopped plan, refer to Stop a task in progress.