how to give multiple recipes in chef-solo using vagrant?

70 views Asked by At

My Vagrantfile looks like this:

config.vm.define "ubuntu1" do |ubuntu1|
    ubuntu1.vm.box = "bento/ubuntu-14.04"
    ubuntu1.vm.network "private_network", ip: "192.168.100.10"
    ubuntu1.vm.provision "chef_solo" do |chef|
      chef.add_recipe "zoo::default"
      chef.add_recipe "zoo::ubuntu1"
    end
end

My Cookbook structure looks like this :

cookbooks
└── zoo
    └── recipes
        ├── default.rb
        ├── ubuntu1.rb
        ├── ubuntu2.rb
        └── ubuntu3.rb

Whenever I run $ vagrant up --provision Only zoo::default recipe is running not the ubuntu1 recipe.

What changes have to be made in Vagrantfile so that ubuntu1 recipe also runs?

0

There are 0 answers