Add --limit flag to salt cli.
Many times I need of a feature to target a limited number of minions to a match. The limit could be random or not, it doesn't matter to me.
Example:
salt -G 'role:web-frontend' --limit 1 state.apply mystate test=True
+1
+1
+1
@deuscapturus, thanks for reporting. Is the intended use of this to limit the output of test=True
? I could see how it might be useful for sys.doc as well.
I also have a database schema management state that only needs to be run on a single minion to bring all minions to the proper state. Any state that affects a shared resource could benefit from this feature.
This is already implemented. See the --subset
flag to the salt
command.
Most helpful comment
This is already implemented. See the
--subset
flag to thesalt
command.