Grouping salt minions by minion_id

25 views
Skip to first unread message

Espresso Beanies

unread,
Sep 28, 2016, 10:56:07 AM9/28/16
to Salt-users
Good morning,

Is there a way to group salt minions by their 'id' from the salt command line or config file? The nodegroups category in the salt master file only works off minion characteristics, not actual minion_id's and I can't find any of the .sls files mentioned in previous questions.

Thanks in advance,

Clint Dilks

unread,
Sep 28, 2016, 5:04:46 PM9/28/16
to salt-...@googlegroups.com
Hi,

I may be mis-understanding what you are asking here, but let say you had minions m1, m2 and m3 you can simply do something like salt 'm*' test.ping
I believe the same will also work from things like your top file, but I can't find any examples at the moment where we are using this.



Rémy Dernat

unread,
Oct 4, 2016, 3:32:36 AM10/4/16
to salt-...@googlegroups.com
Hi,

Indeed, the naming convention for your minions is the best thing to do. However, if you can't do that and nodegroups does not satisfied your needs, you can also use grains on your minons and then target them with the appropriate grains; eg :

 salt 'lxd*' grains.append roles container
salt -G "roles:container" test.ping

Perhaps, you can also try something with pillar...

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages