salt-call grains.get cluster local: up102 Is there a way for salt-call to display only the value (eg. up102) without the rest of the output, or must I resort to using awk or jq etc to extract it?

I don't see any command line options to do this, but maybe there's a built-in way that I'm not seeing.


In the past I didn't find a native solution for that. I mostly pipe it with jq this way:

# salt-call --out=json grains.get saltversion|jq '.[]'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.