Skip to content

Instantly share code, notes, and snippets.

@hernandesbsousa
Forked from darkone23/Vagrantfile
Created February 15, 2014 19:23
Show Gist options
  • Save hernandesbsousa/9023984 to your computer and use it in GitHub Desktop.
Save hernandesbsousa/9023984 to your computer and use it in GitHub Desktop.
- hosts: serf
tasks:
- name: creating required directories
file: path={{ item }} state=directory
with_items:
- ~/tmp
- ~/bin
- name: fetching serf binary
get_url: dest=~/tmp/serf.zip url=https://dl.bintray.com/mitchellh/serf/0.1.1_linux_amd64.zip
- name: extracting serf archive
shell: chdir=~/tmp creates=~/bin/serf unzip serf.zip -d ~/bin
- name: adding ~/bin to user path
lineinfile: regexp='PATH=\\$HOME/bin' line='export PATH=\$HOME/bin:\$PATH' dest=~/.bashrc
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :serf do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :ansible do |ansible|
ansible.playbook = "serf.yaml"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment