I created a complex state for the API service, it includes git checkouts, python venv, uwsgi, nginx, etc. etc. It works great.
Now I would like to turn it into a template and execute it several times in a minion, with variables set from a column - in other words.
{% for apiserver in pillar.apiservers %} include apiserver_template.sls, locals: apiserver.config {% endfor %}
where apiserver_template will work with the context provided by it, with apiserver.config having all the configuration data for each instance of the API. I know that the syntax is incorrect, but I hope I communicate with the idea - ideally, something like executing ruby ββscores with the delivery of local variables.
How is this done correctly in salt water?
devops configuration-management salt-stack
DeeY
source share