Learn about best practices for creating your target groups and view some example target groups and use cases.
Although there’s no limit to how many targets you can create in Tanzu Salt, try to create the simplest targeting rules that encompass all the machines you need to take action against.
Before you create targets for your jobs, start with a list of use cases to help you determine which target types to use. For example, for patching, you can use grains to target a specific operating system. The following table contains some examples of target groups, common use cases, and recommended target type.
Target group | Operating system | Target type |
---|---|---|
Operating system |
|
Grain |
Application cluster |
|
Glob or list |
Data center, subnet, availability zone, or other network segment |
|
Glob or custom grain |
Custom method |
|
Custom grain |