Reputation: 1200
I am adding this Solr Chef recipe an existing vagrant box . I want to override the version attribute here . Do I override these variables in one of the json files or it has to be overridden in the recipe attributes file itself?
Upvotes: 0
Views: 673
Reputation: 11222
For your use case it's ok to override it in Vagrantfile directly. Check more info about chef solo and vagrant here.
tldr;
Just provide chef.json
option with attributes in your Vagrantfile like:
Vagrant.configure("2") do |config|
config.vm.provision "chef_solo" do |chef|
# ...
chef.json = {
"solr" => {
"version" => "4.6.1"
}
}
end
end
In general practise it's common to set attributes inside roles, or by creating wrapper cookbooks around community ones, and with that there is no need for changing original source code.
Upvotes: 3