Last active
December 23, 2015 07:09
-
-
Save mlafeldt/6598563 to your computer and use it in GitHub Desktop.
Install Chef 11 with Vagrant's shell provisioner
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
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu-12.04" | |
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
# Install Chef version 11 | |
config.vm.provision :shell, :inline => <<EOS | |
set -e | |
if ! command -V chef-solo >/dev/null 2>/dev/null; then | |
curl -L https://www.opscode.com/chef/install.sh | bash -s -- -v 11.6.0 | |
fi | |
EOS | |
config.vm.provision :chef_solo do |chef| | |
# ... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@gildegoma Btw, I'm now using https://github.com/schisamo/vagrant-omnibus which also runs the install.sh script but is much easier to use. It even takes care of the curl/wget issue you ran into.