- From: Joshua Timberman <
>
- To: "
" <
>
- Subject: [chef] Re: How to use a override attribute in environments
- Date: Sat, 20 Jul 2013 23:23:39 +0000
- Accept-language: en-US
Simply put, you don't. The autovivvified hash notation available to node
attributes in cookbook attributes files and recipes is not available in the
Ruby DSL for roles. The Ruby DSL for roles is translated to JSON by knife on
upload to the Chef Server, and the JSON is purely a hash data structure.
Cheers
Joshua
On Jul 20, 2013, at 3:59 PM, David Montgomery
<
>
wrote:
>
The is a very nested hash.....I am aware of that page...how do I avoid the
>
use of the => notation
>
>
>
>
On Sun, Jul 21, 2013 at 4:45 AM, Joshua Miller
>
<
>
>
wrote:
>
Check out the definition and syntax of "default_attributes" under
>
http://docs.opscode.com/essentials_environments.html
>
>
Also note that "override" in this case is an overloaded term. The same
>
page includes the attribute precedence table.
>
>
>
On Sat, Jul 20, 2013 at 1:00 PM, David Montgomery
>
<
>
>
wrote:
>
Hi
>
>
In my development environment I would like to use the below
>
>
>
name "development"
>
description "The development environment"
>
default['chef_client']['handler']['graphite']['host'] =
>
"monitor.dev.test.com"
>
>
>
knife environment from file
>
/home/ubuntu/workspace/feed-chef/chef-repo/environments/development.rb
>
ERROR: knife encountered an unexpected error
>
This may be a bug in the 'environment from file' knife command or plugin
>
Please collect the output of this command with the `-VV` option before
>
filing a bug report.
>
Exception: NameError: undefined local variable or method `default' for
>
development:Chef::Environment
>
>
>
>
In the cookbook attribute file:
>
default['chef_client']['handler']['graphite']['host'] =
>
"monitor.dev.test.com"
>
>
So..what is the proper format to override the the environment?
>
>
Thanks
>
>
Archive powered by MHonArc 2.6.16.