Targeting using salt-ssh and custom grains

15 views
Skip to first unread message

eric....@nutanix.com

unread,
Jun 26, 2017, 5:48:31 PM6/26/17
to Salt-users
It is possible to use grains-based targeting on the salt-ssh command line?
For example, if I define the custom grain"location" in the roster file like this:

mytest:
  host: mytest
  minion_opts:
               grains:
      location:
       - atlanta


Operations such as the following do work:


% salt-ssh '*' grains.get location

mytest:

    - atlanta


Ideally, I'd be able to do something like:


% salt-ssh -G "location:atlanta" test.ping


Is this even possible with salt-ssh?

Thanks

-e



Reply all
Reply to author
Forward
0 new messages