..."default_attributes": {"my_attr": "/my/path"},...
Chef::Log.info('---------------')Chef::Log.info(node.chef_environment)Chef::Log.info(node[:my_attr])Chef::Log.info(Chef::Environment.load(node.chef_environment).default_attributes['my_attr'])Chef::Log.info('---------------')
$ rvmsudo vagrant provision[default] Running provisioner: Vagrant::Provisioners::ChefClient...[default] Creating folder to hold client key...[default] Uploading chef client validation key...[default] Generating chef JSON and uploading...[default] Running chef-client...stdin: is not a tty[2012-12-26T06:52:26+00:00] INFO: *** Chef 10.16.2 ***[2012-12-26T06:52:27+00:00] INFO: Run List is [role[web]][2012-12-26T06:52:27+00:00] INFO: Run List expands to [vine_web][2012-12-26T06:52:28+00:00] INFO: Starting Chef Run for dev_all[2012-12-26T06:52:28+00:00] INFO: Running start handlers[2012-12-26T06:52:28+00:00] INFO: Start handlers complete.[2012-12-26T06:52:29+00:00] INFO: Loading cookbooks [build-essential, nginx, ohai, vine_web][2012-12-26T06:52:29+00:00] INFO: ---------------[2012-12-26T06:52:29+00:00] INFO: dev[2012-12-26T06:52:29+00:00] INFO: nil[2012-12-26T06:52:29+00:00] INFO: /my/path[2012-12-26T06:52:29+00:00] INFO: ---------------[2012-12-26T06:52:31+00:00] INFO: Chef Run complete in 3.026496384 seconds[2012-12-26T06:52:31+00:00] INFO: Running report handlers[2012-12-26T06:52:31+00:00] INFO: Report handlers complete
Is this the expected behavior, perhaps due to the order in which things happen? If no, what have I done wrong?
Is my workaround the right thing to be doing? It took quite a bit of googling before I stumbled into the Chef docs and thought to try that. If yes, is there somewhere in the docs I can make a note of this?
Archive powered by MHonArc 2.6.16.