So, I have no answer to the question why the chef treats the variables differently in the recipes, but here is my fix.
Some change in the way we get attributes from a cookbook annoyed me. Since I used Chef Solo and did not support the roles, I simply created the role, redefined the attributes there, and then named my main cookbook.
This model is more closely related to how I conceptualize the chef when I work on the server, so for me this is a valid solution. I have done the following:
Create a role called Base
name "base" description "The base role" run_list "recipe[base]" override_attributes "nginx" => { 'install_method' => 'source', 'source' => {'version' => '1.5.3'} }
Add Role to Execution List via Vagrantfile
config.vm.provision "chef_solo" do |chef| chef.cookbooks_path = "vendor/cookbooks" chef.roles_path = "roles" chef.data_bags_path = "data_bags" chef.add_role "base" end
source share