Because renderers are so often used to manage SLS files, it is often easiest to troubleshoot them using the state compiler, as we have been doing already in this chapter.
First, generate a small SLS file that contains the specific elements which you need to test. This will either be a data file in the format that a serialization engine uses, or a text-based file that results in a data-serialization file format. If you are writing a templating renderer, it is often easiest to just use YAML.
The state
execution module contains a number of functions that exist primarily for troubleshooting. We used state.show_sls
in our examples, with --out yaml
, because it displays the output in a format that we're already used to in our SLS files. However, some other useful functions are: