Troubleshooting wheel modules
Once again, wheel modules are a little special when it comes to troubleshooting, because there is no specific command-line program in Salt that executes them directly. Unlike auth
modules, they can't even be tested using the salt
command.
However, as you have just seen, they can be tested using Salt API and curl
:
# curl localhost:8080/run \ -H 'Accept: application/json' \ -d username=larry \ -d password=123pass \ -d eauth=pam \ -d client=wheel \ -d fun='runners.list'
You can also test wheel modules using the event system in Salt. It is good to get used to testing this way, since wheel modules are so useful inside reactor modules.
Let's go ahead and set up a reactor that deletes a Minion's key from the Master:
# This reactor should be saved as /srv/reactor/test_delete.sls test_delete_minion: wheel.key.delete: - match: data['bad_minion']
Then add that reactor to the master
configuration file:
reactor: - 'user/minon/delete/*': - ...