Using Python in SaltStack reactor
Sometimes you need to do some complex actions in a Salt Reactor in which case Python comes in handy.
The documentation is not very clear on how to write Python states. The main point is that Salt expects a structure that can be compiled to a Python dictionary. The run() function has to return a dictionary which resembles the state you would write with YAML.
Here’s an example to add a domain to route 53:
|
|