Defining targets for your jobs or operations helps to prevent operations from running on nodes that should not run that operation. You can organize your targets using grains, globs, lists, or compounds.

What is a target?

A target is a group of minions, across one or many Salt masters, that a job's Salt command applies to. Targets can contain minions that are connected to any Salt master in your environment. A Salt master can also be managed like a minion and can be a target if it is running the minion service.

Before you start

Before you create your targets, you must think about the target groups you want to create. For example, you might want to create a target group for a security zone or a single subnet. How you organize your target groups will depend on your organization's needs.

To create targets for your jobs, you can either:

  1. Create targets using the Targets workspace
  2. Create targets using the Minions workspace

If you use the Minions workspace to manage your target groups, consider switching to the Targets workspace. The Minions workspace will be deprecated in a future release and the Targets workspace will become the default method for managing target groups.