Created
August 12, 2015 11:35
-
-
Save setkeh/4efc34139ed823c61ec9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- name: Install system packages | |
yum: name={{ item }} state=installed | |
with_items: | |
- ruby | |
- gcc | |
- rubygems | |
- gcc-c++ | |
- ruby-devel | |
- libxslt-devel | |
- libxml2-devel | |
- patch | |
- name: Update gem | |
shell: gem update | |
- name: Update gem system | |
shell: gem update --system | |
- name: Fix Psych gem bug | |
shell: gem uninstall psych -v '2.0.13' | |
- name: Install Bundler | |
gem: name=bundler state=latest | |
- name: Install Rails | |
gem: name=rails state=present | |
- name: Install unicorn | |
gem: name=unicorn state=latest | |
- name: Setup unicorn | |
shell: rails new /var/www unicorn | |
- name: Download unicorn config | |
shell: curl -o /var/www/config/unicorn.rb https://raw.githubusercontent.com/defunkt/unicorn/master/examples/unicorn.conf.rb | |
- name: Update unicorn APP_PATH | |
ini_file: dest=/var/www/config/unicorn.rb | |
section=APP_PATH | |
option=enabled | |
value="/var/www/unicorn" | |
- name: Update unicorn working_dirctory | |
ini_file: dest=/var/www/config/unicorn.rb | |
section=working_directory | |
option=enabled | |
value=APP_PATH | |
- name: Update unicorn stderr_path | |
ini_file: dest=/var/www/config/unicorn.rb | |
section=stderr_path | |
option=enabled | |
value=APP_PATH + "/log/unicorn.stderr.log" | |
- name: Update unicorn stdout_path | |
ini_file: dest=/var/www/config/unicorn.rb | |
section=stdout_path | |
option=enabled | |
- name: Update unicorn pid path | |
ini_file: dest=/var/www/config/unicorn.rb | |
value=APP_PATH + "/log/unicorn.stdout.log" | |
section=pid | |
option=enabled | |
value=APP_PATH + "/tmp/pid/unicorn.pid" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment