Created
May 27, 2016 08:38
-
-
Save silenius/e6a4025ee0427b2b25a3f28127cf198c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcigar@dev:/usr/local/etc/salt/states/webapps/ > more harmonia.sls | |
{% set cfg = salt['bbpf_webapp.config']('harmonia') %} | |
{% include 'webapps/_template.sls' %} | |
(MORE LINES COME HERE) | |
jcigar@dev:/usr/local/etc/salt/states/webapps/ > more _template.sls | |
include: | |
- venvs.webapps.{{ cfg.venv.name }} | |
(MORE LINES COME HERE) | |
jcigar@dev:/usr/local/etc/salt/states/webapps/ > more ../venvs/webapps/harmonia.sls | |
{% set venv = "harmonia" %} | |
{% include "venvs/webapps/_template.sls" %} | |
(MORE LINES COME HERE) | |
jcigar@dev:/usr/local/etc/salt/states/webapps/ > more ../venvs/webapps/_template.sls | |
{% set cfg = salt['bbpf_webapp.venv'](venv) %} | |
include: | |
- users.webapps.{{ cfg.user }} | |
# Install the virtualenv | |
{{ venv }}_venv: | |
virtualenv.managed: | |
- name: {{ cfg.full_path }} | |
- venv_bin: {{ cfg.venv_builder }} | |
- system_site_packages: False | |
- user: {{ cfg.user }} | |
- clear: False | |
- require: | |
- file: {{ cfg.full_path }} | |
- user: {{ cfg.user }} | |
- pkg: {{ salt['pillar.get']('postgresql:lookup:pkg_client') }} | |
{% if cfg.python_version == 3.4 %} | |
- pkg: python34 | |
{% elif cfg.python_version == 2.7 %} | |
- pkg: python27 | |
- pkg: py27-virtualenv | |
{% endif %} | |
(MORE LINES COME HERE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment