devops/roles/unicorn/tasks/main.yml
---
- name: Configure unicorn
template: src=unicorn.rb.j2 dest={{ shared_path }}/config/unicorn.rb owner={{ user_name }} group={{ group_name }}
- name: Install unicorn
command: /bin/bash -l -c 'gem install unicorn --no-ri --no-rdoc' chdir={{ current_release_path }}
sudo: no
- name: Create upstart config
template: src=upstart.conf.j2 dest=/etc/init/{{ unicorn_app_name }}.conf
notify: restart application