I have two providers: virtualbox and aws
The provisioner is: chef zero

How do I add different recipes according to the provider?

For example:

    clm.vm.provision :chef_zero do |chef|
        chef.cookbooks_path = ["./cookbooks/"]
        chef.environments_path = ["./environments/"]
        chef.environment = 'prev'
        chef.add_recipe "CLM::init"
        *if provider == "aws"*
          chef.add_recipe "base::ec2"
        end
    end

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/3ceac6f1-08fc-4ed2-bd54-d9244e6db601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to