Skip to content

Instantly share code, notes, and snippets.

@felipellrocha
Created March 4, 2014 17:25
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 felipellrocha/3bc59aab9666e1aea6ef to your computer and use it in GitHub Desktop.
Save felipellrocha/3bc59aab9666e1aea6ef to your computer and use it in GitHub Desktop.
django-essentials:
pkg.installed:
- names:
# lxml
- libxml2
- libxml2-dev
- libxslt1-dev
# libcurl
- libcurl4-openssl-dev
{{ pillar['directories']['main_env'] }}:
file.directory:
- dir_mode: 755
- file_mode: 644
- makedirs: True
- user: {{ pillar['main_user'] }}
- runas: {{ pillar['main_user'] }}
- group: {{ pillar['main_user'] }}
virtualenv.managed:
- system_site_packages: False
- user: {{ pillar['main_user'] }}
- require:
- file: {{ pillar['directories']['main_env'] }}
#{% if not grains['id'].endswith('local') %}
#wheels:
# file.recurse:
# - name: /srv/salt/conf/wheelhouse
# - source: salt://wheelhouse/
# - include_empty: True
#{% endif %}
## updating pip so we can use wheels
#wheel-requirements:
# pip.installed:
# - upgrade: True
# - requirements: salt://django/wheels-requirements
# - env: {{ pillar['directories']['main_env'] }}
python-pkgs:
pip.installed:
- env: {{ pillar['directories']['main_env'] }}
- requirements: salt://django/dev-requirements
- require:
- pkg: django-essentials
# - use_wheel: True
# - find_links: /srv/salt/conf/wheelhouse
# - pip: wheel-requirements
{% if not grains['id'].endswith('local') %}
{{ pillar['directories']['settings'] }}/application-settings.py:
file.managed:
- source: salt://src/settings.py
- template: jinja
{% endif %}
{% if not grains['id'].endswith('local') %}
{{ pillar['directories']['source'] }}:
file.recurse:
- source: salt://src/
- include_empty: True
- file_mode: 774
- dir_mode: 774
- user: {{ pillar['main_user'] }}
- group: {{ pillar['main_user'] }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment