2014-12-30 125 views

回答

3

對於您的用例,可以直接在Vagrantfile中覆蓋它。查看更多關於廚師獨奏和流浪的信息here

tldr;

只需提供chef.json選項和屬性在Vagrantfile這樣的:

Vagrant.configure("2") do |config| 
    config.vm.provision "chef_solo" do |chef| 
# ... 
    chef.json = { 
    "solr" => { 
     "version" => "4.6.1" 
     } 
    } 
    end 
end 

在一般的做法是很常見設置裏面角色的屬性,或周圍社區的人創造wrapper cookbooks,並與有沒有必要改變原始的源代碼。