Run a task on one or more specific nodes

An orchestrator job can target one or more specific nodes. This is useful if you want to run a task on a single node, a few specific nodes, nodes that are not ins the same node group, or nodes that can't be easily identified by a single PQL query.

Before you begin:

Install the tasks you want to use.

Make sure you have access to the nodes you want to target.

Make sure you have permissions necessary to run tasks.

You can add network devices to a node list when you have installed modules for device transports in your production environment. You can find such modules in Puppet Forge.
 
  1. In the console, in the Orchestration section, click Tasks.
  2. Click Run a task in the upper right corner of the Tasks page.
  3. In the Code environment field, select the environment where you installed the module containing the task you want to run. The default is production.
  4. In the Task field, select a task to run. For example, service.
    If the tasks you expect are not available, you either have no tasks installed, or you don't have the correct permissions to run them.
  5. Optional: In the Concurrency limit field, specify the number of nodes on which the task can be executed simultaneously.
  6. Optional: In the Task description field, provide a description. The text you enter here appears on the task list and task details pages.
  7. Optional: If you want to limit how long the task can run before being automatically cancelled, under Timeout, select Yes and specify a time interval (such as 5 minutes).
  8. Under Task parameters, add optional parameters and enter values for the optional and required parameters on the list.
    You must click Add to task for each optional parameter-value pair you add to the task.

    To view information about required and optional parameters for the task, select View task metadata below the Concurrency limit field.

    Express values as strings, arrays, objects, integers, or Booleans. You must express empty strings by entering a pair of double quotation marks with no space between (""). Structured values, like arrays, must be valid JSON.

    Tasks that have default values use the default values when running unless you specify other values.

    The parameters you supply the first time you run a task are used for subsequent task runs when you use Run again on the Task details page.
  9. Click Next: Select nodes.
  10. Under Node selection method, from the dropdown, select Node list.
  11. On the Inventory nodes tab, in the Find in inventory search field, search for and select the nodes you want to add to the task.

    You can select nodes from multiple searches to create a complete list of the nodes you want to target.

    The search does not handle regular expressions.

    Nodes you select are added to the list under Nodes selected for this task. To remove nodes from the list, click Edit selection.

  12. When you have selected all the nodes you want to target, click Next: Review and schedule.
  13. Review the details of your job configuration and the selected nodes. To make changes, you can click Edit in the Configure job and Select nodes summaries, or click Back to return to previous steps.
  14. Schedule the task or, to run the task immediately, click Run task.

    You can view the task job status and a list of previous and scheduled tasks on the Tasks page.

    To rerun a task, click on the relevant ID and click Run again, choosing whether to rerun it on all nodes or only the nodes that failed during the initial run.