Interesting. I just tried it out and I got similar results. What appears to be happening is that you've encountered two issues. Running apt-get upgrade
attempts to upgrade the package "grub-pc" among others which complains about the virtual machine disk's UUID changing for some reason. This complaint does two things:
Following advice from here I was able to get it to work by replacing the first line of your bootstrap.sh
to the rather frightening:
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
But you might consider filing a bug with regard to the console mangling with Vagrant.
Matt Moretti
I'm running this on precise32 (mac osx, vagrant)This is what happends to my terminl during a 'vagrant up' run, and it seems chef doesn't run at all.http://imageshack.us/a/img29/7233/vpea.png
config.vm.provision :shell, :path => "bootstrap.sh"config.vm.provision :chef_solo do |chef|chef.cookbooks_path = ["cookbooks"]chef.add_recipe "graphite"endbootstrap.sh is:sudo apt-get update -y && sudo apt-get upgrade -ysudo apt-get install -y wget build-essentialsudo apt-get install -y htop treesudo apt-get install -y apache2-utils sysstatOn Wed, Oct 9, 2013 at 12:11 PM, Matthew Moretti < " target="_blank"> > wrote:
You definitely can run more than one provisioner (see “Multiple Provisioners” here), and you’re defining them correctly as far as I can tell. There must be some other issue. Do you have some output you could share?
Matt Moretti
On Wed, Oct 9, 2013 at 12:03 PM, S Ahmed < " target="_blank"> > wrote:
I'm guessing the answer is no because that is what I am experiencing, but I am trying to do this:config.vm.provision :shell, :path => "bootstrap.sh"config.vm.provision :chef_solo do |chef|chef.cookbooks_path = ["cookbooks"]chef.roles_path = "roles"chef.add_role "base"chef.add_role "webserver"endI am using a bootstrap script for simple thing like:sudo apt-get update -y && sudo apt-get upgrade -ysudo apt-get install -y wget build-essentialsudo apt-get install -y htop treesudo apt-get install -y apache2-utils sysstatBut it seems the cookbooks part isn't running, actually when I do run this using:vagrant upBy the end of it, my screen has what looks like chinese script on it and I have to close and open a new terminal.Anyhow, just wondering if you guys run a bootstrap type script before chef in your vagrant testing etc.
Archive powered by MHonArc 2.6.16.