[chef] Re: Role attributes are not getting propogated as expected


Chronological Thread 
  • From: Sheppy Reno < >
  • To: " " < >
  • Subject: [chef] Re: Role attributes are not getting propogated as expected
  • Date: Mon, 8 Sep 2014 12:55:46 +0000
  • Accept-language: en-US

Not sure if this is just a typo in the email or actually in your code,
but you have two s's in WindowsServices(s) in the role.

-Sheppy

On Sun, 2014-09-07 at 21:27 -0700, 

 wrote:
> Hi,
> 
> I'm setting few default attributes as part of the role as defined in the 
> below
> json
> 
> {
>   "name": "web1",
>   "default_attributes": {
>     "webmanager": {
>       "steps": {
>       "setup_ldap": true
>       },
>       "features": {
>       "WindowsServicess": "",
>       "Core": "(All)",
>       "Gui": "FeatureWebSite",
>       }
>     }
>   },
>   "run_list": [
>     "recipe[custom-web]"
>   ]
> }
> 
> When I try to access it as part of recipe as mentioned below it's not 
> obtaining
> the proper value from the role attributes as expected. It's just getting 
> null
> values.
> 
> feature[:WindowsServices] =
> "\"#{node[:webmanager][:features][:WindowsServices]}\""
> feature[:Core] = "\"#{node[:webmanager][:features][:Core]}\""
> feature[:Gui] = "\"#{node[:webmanager][:features][:Gui]}\""
> 
> When I check it using chef-shell it's showing proper values for those
> attributes. It's also getting displayed properly when I check it using 
> `knife
> node show <nodename> -l` or `knife node show <nodename> -a webmanager`. Only
> problem is it's not getting set properly during converge phase of 
> chef-client
> execution.
> 
> Thanks




Archive powered by MHonArc 2.6.16.

§