[chef] Re: can you run both a .sh file and chef_solo?


Chronological Thread 
  • From: Matthew Moretti < >
  • To:
  • Subject: [chef] Re: can you run both a .sh file and chef_solo?
  • Date: Wed, 9 Oct 2013 12:11:29 -0400

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"
  end

I am using a bootstrap script for simple thing like:

sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install -y wget build-essential
sudo apt-get install -y htop tree
sudo apt-get install -y apache2-utils sysstat

But it seems the cookbooks part isn't running, actually when I do run this using:

vagrant up

By 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.

§