Skip to content

Instantly share code, notes, and snippets.

@dstokes

dstokes/init.sls Secret

Created June 16, 2014 21:12
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 dstokes/e0ed38d56d2046139ce5 to your computer and use it in GitHub Desktop.
Save dstokes/e0ed38d56d2046139ce5 to your computer and use it in GitHub Desktop.
include:
- deploy.common
{%- if 'ruby' in pillar %}
- deploy.rails
{%- endif %}
{% set deploy = pillar['deploy'] %}
{% set app_name = deploy['app_name'] %}
{% set deploy_dir = deploy.get('deploy_dir', '/srv/deploy') %}
{% set app_dir = deploy_dir + '/' + app_name %}
get_{{ app_name }}_repo:
git.latest:
- name: {{ deploy['git_repo'] }}
- rev: {{ deploy.get('git_rev', 'HEAD') }}
- target: {{ app_dir }}/build
- user: {{ deploy['user'] }}
- always_fetch: true
- require:
- sls: deploy.common
- require_in:
{%- if 'ruby' in pillar %}
- sls: deploy.rails
{%- endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment