4 ms·
It's a common misconception to read too much into Renderers. Salt's State system takes a data structure as input so each of the Renderer modules is really just
by whiteinge 9y ago
It's a common misconception to read too much into Renderers. Salt's State system takes a data structure as input so each of the Renderer modules is really just what flavor of "data structure generator" you like most.
The so-called highstate data structure is very stable and well documented so Renders rarely need changes:
https://docs.saltstack.com/en/latest/ref/states/highstate.html https://docs.saltstack.com/en/latest/ref/states/highstate.ht...
The regular Python interface you mentioned is my favorite too, when YAML/Jinja aren't a good fit, and people do use it. It's 40 LOC and has only needed 32 commits in the six years it's been around:
https://github.com/saltstack/salt/blob/5406a7cdd4729/salt/renderers/py.py#L100-L140 https://github.com/saltstack/salt/blob/5406a7cdd4729/salt/re...
The takeaway is YAML/Jinja generate exactly the same result as the Python Renderer so use what you like.