Targeting minions

One of the biggest advantages of Salt is the ability to target minions based on various parameters. This gives us the flexibility to apply states, run commands, and gather information from any combination of minions that we need. In this recipe, you will learn how to target minions using different methods.

How to do it...

Since there are quite a lot of ways to target minions, we will not run the command and view the output for each of them. We will look at the possible ways of targeting minions and the methods to implement them. Each of the following examples show the procedure to target minions from the Salt command and also in the top.sls file. However, examples for top.sls are provided only for matchers that have this feature. ...

Get Salt Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.