I am using salt for last one month. Whenever I run a command say sudo salt '*' test.ping
, then the master pings all the minions and the response being the list of all the minions which are up and running. Output looks something like:
{
"minion_1": true
}
{
"minion_2": true
}
{
"minion_3": true
}
In the master's conf
file, return type is configured to JSON.
But if I execute an incorrect command through salt master say sudo salt '*' test1.ping
, then the master returns something like this
{
"minion_1": "'test1.ping' is not available."
}
{
"minion_2": "'test1.ping' is not available."
}
{
"minion_3": "'test1.ping' is not available."
}
In both the outputs displayed above, the command has given a success exit code on the master's shell/terminal. How do we track which minions were not able to execute the commands. I am not interested in what type of error it is, I just need some or the other way to track the minions which failed to execute the command.
The last solution is to write a parser which will read the complete output and decide for itself. Hope that there is a better solution.