Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
122 lines (107 sloc) 2.61 KB
---
- hosts: all
vars:
user: vagrant
ruby: ruby-1.9.3-p545
user: "{{ user }}"
tasks:
##
# Apt package installation of required software.
#
- name: Update APT package cache
tags: common
apt: update_cache=yes
sudo: true
- name: Install packages
apt: pkg={{ item }} state=installed
tags: common
sudo: true
with_items:
- aspell
- build-essential
- curl
- python-apt
- python-pycurl
- unzip
- vim
##
# set up s3cmd
#
- name: s3mcd | download .zip
get_url:
url=https://github.com/s3tools/s3cmd/archive/v1.5.0-beta1.zip
dest=~{{ user }}/v1.5.0-beta1.zip
- name: s3cmd | remove exist extract directory
file:
path=~{{ user }}/s3cmd-1.5.0-beta1
state=absent
- name: s3cmd | extract it
command: unzip v1.5.0-beta1.zip
chdir=~{{ user }}
- name: s3cmd | install s3cmd
command: python setup.py install
chdir=~{{ user }}/s3cmd-1.5.0-beta1
sudo: true
##
# set up git
#
- name: git | Add git repo
apt_repository: repo='ppa:git-core/ppa'
tags: git
sudo: true
- name: git | Install packages
apt: pkg={{ item }} state=latest update_cache=yes
tags: git
sudo: true
with_items:
- git
##
# set up git
#
- name: git | Set default configs
template:
src=~/.gitconfig
dest=~{{ user }}/.gitconfig
owner={{ user }}
group={{ user }}
mode=0644
##
# set up my environment
#
- name: vim | Copy parent .vimrc
template:
src=~/.vimrc
dest=~{{ user }}/.vimrc
owner={{ user }}
group={{ user }}
mode=0644
##
# set up my environment
#
- name: bashrc | Set up the terminal
get_url:
url=https://raw2.github.com/erikwiffin/analytics-promises/config-files/bashrc
dest=~{{ user }}/.bashrc
force=yes
- name: bashrc | Chown bashrc for the user
file:
path=~{{ user }}/.bashrc
owner={{ user }}
group={{ user }}
mode=0644
- name: s3cmd | Copy host .s3cfg file
template:
src=~/.s3cfg
dest=~{{ user }}/.s3cfg
owner={{ user }}
group={{ user }}
mode=0644
##
# ruby stuff
#
- name: ruby | Install rvm
shell: \curl -sSL https://get.rvm.io | bash -s stable --autolibs=3
creates=~/.rvm
- name: ruby | Install ruby
shell: ~/.rvm/bin/rvm install --default {{ ruby }}
creates=~/.rvm/rubies/{{ ruby }}