Search code examples
salt-project

SaltStack: How to target specific minions


Is it possible to target a specific set of minions when applying a state? Instead of doing:

salt '*' state.sls mystate.sls

I want to do:

salt '[key1,key2,...]' state.sls mystate.sls

Solution

  • Of course, just use -L

    salt -L 'key1,key2,key3,...' state.sls mystate.sls

    http://docs.saltstack.com/en/latest/topics/targeting/globbing.html#lists