Troubleshooting execution modules

As with any programming, the more time you spend writing execution modules, the more likely you are to encounter issues. Let's take a moment to talk about how to troubleshoot and debug your code.

Using salt-call

The salt-call command has always been a valuable tool for testing and troubleshooting code. Without it, you would need to restart the salt-minion service each time you wanted to test new code; believe me, that gets old fast.

Because salt-call doesn't start up a service, it will always run the latest copy of the Salt code. It does do most of the things that the salt-minion service does: it loads grains, connects to the Master (unless told not to) to obtain pillar data, goes through the loader process to decide ...

Get Extending SaltStack now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.