Skip to content

Instantly share code, notes, and snippets.

@silenius
Created May 27, 2016 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silenius/cb56e9cc15b420d6b431552ec537d74d to your computer and use it in GitHub Desktop.
Save silenius/cb56e9cc15b420d6b431552ec537d74d to your computer and use it in GitHub Desktop.
pillar/venvs/webapps.sls:
venvs:
webapps:
venv1:
python_version: 2.7
venv2:
python_version: 3.4
pillar/webapps/init.sls:
webapps:
items:
webapp1:
use_venv: venv1
(...)
webapp2:
use_venv: venv2
(...)
states/venvs/_template.sls
{{ venv }}_venv:
(...)
states/venvs/venv1.sls:
{% set venv = 'venv1' %}
{% include 'pillar/venvs/_template.sls' %}
states/webapps/_templates.sls
include:
- venvs.{{ webapp.venv }}
{{ webapp.name }}_blabla:
file.managed:
(...)
states/webapps/webapp1.sls
{% set webapp = salt.myconfigmodule.config('webapp1') %}
{% include 'states/webapps/_template.sls' %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment