salt-master: 2016.11.5 (Carbon)
salt-api: 2016.11.5 (Carbon)
salt-minion 2016.11.5 (Carbon)
cherrypy: 10.2.2
After setting up salt-api using this tutorial I've been able to successfully use the API via curl. For example, I can move files. However, salt-api seems to return {"success": true}
as long as some command actually went out to the minion.
Is there a way to get any of the output from the instructions sent to the minion (like, in json or any other format as long as it's useful data)? For example, when I try to move a file, if the file doesn't exist, salt-api just silently fails and returns {"success": true}
. Is there a way to get the output to tell me whether the actual instructions passed or failed?
I was able to find salt.output.json_out, which seems to only change the output of {"success": true}
to another format....which isn't useful to me. Is there some documentation I haven't found that can help me return something other than {"success": true}
?
EDIT
To clarify, my end goal is to have a program in C# that can make calls to the salt-api, and have it return whether or not the command on the minion was successful.
I know from the output of salt-master -l debug
that a retcode
with an actual boolean value exists, but I have no idea how to reach it.