-2

I am a SaltStack user. When I am playing with those YAML files (and jinja templates), I am always wondering that maybe building the SaltStack project just with Python is more clear. But all advanced samples I can find are building multiple sls YAML files that work together for provision and event reaction.

Is there any practical way to code a SaltStack project mainly with Python instead of YAML files?

1 Answers1

2

You can definitely use python instead of yaml. All Salt really cares about is the resulting data structure.

Here's the general documentation on renderers: https://docs.saltstack.com/en/latest/ref/renderers/

Here's the documentation on the pure Python renderer: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html#module-salt.renderers.py

The PyObjects renderer: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pyobjects.html

And the PyDSL renderer: https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.pydsl.html

One of those should get you what you want.

Utah_Dave
  • 4,531
  • 24
  • 23