Skip to content

Instantly share code, notes, and snippets.

@nicolai86
Created February 12, 2014 06:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nicolai86/8950790 to your computer and use it in GitHub Desktop.
Save nicolai86/8950790 to your computer and use it in GitHub Desktop.
a current usage example for nicolai86.rails-deployment as of v0.6.0
---
- hosts: server
user: app_user
gather_facts: False
vars:
user: app_user
home_directory: "/home/{{ user }}"
deploy_to: "{{ home_directory }}/app"
roles:
-
role: nicolai86.prepare-release
repo: git@git.example.com:app
branch: develop
tags: app
symlinks:
- { src: "{{ shared_path }}/log", dest: "{{ build_path }}/log" }
- { src: "{{ shared_path }}/config/database.yml", dest: "{{ build_path }}/config/database.yml" }
- { src: "{{ shared_path }}/vendor/bundle", dest: "{{ build_path }}/vendor/bundle" }
directories:
- "{{ shared_path }}/log"
- "{{ shared_path }}/public"
- "{{ shared_path }}/config"
templates:
- { src: "templates/config/database.js", dest: "{{ shared_path }}/config/database.yml" }
-
role: nicolai86.rails-deployment
migrate: yes
compile_assets: yes
force_migrate: no
force_asset_compilation: no
tags: app
-
role: nicolai86.finalize-release
tags: app
-
role: nicolai86.ansible-deployment-rollback
tags: rollback
-
role: restart
service: my-app:*
tags:
- app
- rollback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment