Last active
December 17, 2015 22:38
-
-
Save chelsea/5683053 to your computer and use it in GitHub Desktop.
This file contains 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 ruby and rails dependencies | |
user: root_allowed_user | |
hosts: host | |
sudo: true | |
vars: | |
ruby_version: '1.9.3-p286' | |
ruby_url: 'ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.3-p286.tar.gz' | |
tasks: | |
- name: Install ruby dependencies | |
apt: pkg=$item state=installed update-cache=yes | |
with_items: | |
- git-core | |
- libreadline6-dev | |
- libyaml-dev | |
- libsqlite3-dev | |
- sqlite3 | |
- libgdbm-dev | |
- libncurses5-dev | |
- libtool | |
- bison | |
- libffi-dev | |
- libdigest-hmac-perl | |
- unzip | |
- sendmail | |
- openssl | |
- libreadline6 | |
- libreadline6-dev | |
- curl | |
- git-core | |
- zlib1g | |
- zlib1g-dev | |
- libssl-dev | |
- libyaml-dev | |
- libsqlite3-dev | |
- sqlite3 | |
- libxml2-dev | |
- libxslt1-dev | |
- libc6-dev | |
- libncurses5-dev | |
- automake | |
- libtool | |
- bison | |
- subversion | |
- wkhtmltopdf | |
- imagemagick | |
- libmagickcore-dev | |
- libmagickwand-dev | |
- python-psycopg2 | |
- libyaml-dev | |
- libsqlite3-dev | |
- libxml2-dev | |
- libc6-dev | |
- pkg-config | |
- libpq-dev | |
- libcurl4-openssl-dev | |
- libxml2-dev | |
- libfuse-dev | |
- comerr-dev | |
- libfuse2 | |
- libidn11-dev | |
- libkrb5-dev | |
- libldap2-dev | |
- libselinux1-dev | |
- libsepol1-dev | |
- pkg-config | |
- fuse-utils | |
- sshfs | |
- build-essential | |
- tmux | |
- autoconf | |
- curl | |
- libxslt1-dev | |
- postgresql-9.2 | |
- libpq-dev | |
- language-pack-en | |
- name: Download ruby | |
get_url: url=$ruby_url dest=/home/ubuntu/ruby-$ruby_version.tar | |
- name: Extract ruby | |
command: tar -zxf /home/ubuntu/ruby-$ruby_version.tar creates=/home/ubuntu/ruby-$ruby_version | |
- name: Make, configure, and install ruby | |
command: $item chdir=/home/ubuntu/ruby-$ruby_version | |
with_items: | |
- ./configure | |
- make | |
- sudo make install | |
- name: Install rubygems | |
apt: pkg=rubygems | |
- name: Install bundler | |
gem: name=bundler state=present | |
- name: Ensure application databases exists | |
postgresql_db: db=$item | |
with_items: | |
- databases | |
- name: Add postgres user | |
postgresql_user: user=user password=password db=db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment