Skip to content

Instantly share code, notes, and snippets.

@gonz
Last active December 19, 2015 23:08
Show Gist options
  • Save gonz/6032530 to your computer and use it in GitHub Desktop.
Save gonz/6032530 to your computer and use it in GitHub Desktop.
Local ansible vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
set -e
if [ ! -f /usr/local/bin/ansible-playbook ]
then
sudo apt-get update
sudo apt-get -y install python-setuptools python-dev
sudo easy_install pip
sudo pip install ansible
fi
ansible-playbook /vagrant/provisioning/vagrant.yml -i /vagrant/provisioning/development --connection=local
SCRIPT
Vagrant.configure("2") do |config|
# ...
config.vm.provision :shell, :inline => $script
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment