Skip to content

Instantly share code, notes, and snippets.

@juanje
Created September 28, 2012 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save juanje/3797207 to your computer and use it in GitHub Desktop.
Save juanje/3797207 to your computer and use it in GitHub Desktop.
Some useful lines for my Vagrantfiles
# To have the last stable version of Chef (10.14.4)
# with the official Vagrant boxes
config.vm.provision :shell,
:inline => "gem search -i chef -v 10.14.4 || gem install chef -v 10.14.4 --no-rdoc --no-ri"
# with the official Opscode boxes
config.vm.provision :shell,
:inline => "/opt/chef/embedded/bin/gem search -i chef -v 10.14.4 || /opt/chef/embedded/bin/gem install chef -v 10.14.4 --no-rdoc --no-ri"
# To have my favourite text editor installed inside the vagrant without add to the Chef recipes
config.vm.provision :shell,
:inline => "dpkg -l vim | grep -q '^ii vim' || ( sudo apt-get update && sudo apt-get install -y vim )"
@juanje
Copy link
Author

juanje commented Sep 28, 2012

I have those lines added before the config.vm.provision :chef_solo do ... or config.vm.provision :chef_client do ... ones.

@ayosec
Copy link

ayosec commented Sep 28, 2012

There is an improved version in https://gist.github.com/3800745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment