How do you access node.override using chef.json in a Vagrant file?
For example, using vagrant-berkshelf, I'm trying to install a particular Maven version based on Custom JSON Data in the Vagrantfile:
chef.json = {
'maven' => {
'version' => '3.0.5'
}
}
cookbooks\maven_custom\attributes\default.rb
default['maven']['version'] = "3.2.1"
cookbooks\maven_custom\recipes\default.rb
Chef::Log.info(node['maven']['version'])
When I run vagrant provision, the following gets printed out:
3.2.1
Additionally, I tried vagrant reload --provision, yet still saw "3.2.1" print out.
I would've expected 3.0.5 since I had (I thought) overridden it in my Vagrantfile.
How can I correctly extract the Vagrantfile's JSON value of "3.0.5"?