I have the following code in a role which I have verified is loaded:
default_attributes(
:syslogserver => {
:hostname => “sysloger01”,
:ip => [
“10.4.0.5”,
“10.16.0.70”
]
},
:oldvservers => “32”
)
However…
When I enter the shef shell with: ‘shef -z -c /etc/chef/shef.rb’ even
though it shows that the role is loaded and even if I do:
chef > roles.show(“mainrole”)
=> role[mainrole]
I still only get results like these:
chef > node[:syslogserver]
=> nil
chef > node[:syslogserver][:ip]
NoMethodError: undefined method `[]’ for nil:NilClass
chef > node[:oldvservers]
=> nil
chef > node[“oldvservers”]
=> nil
Any idea how I can get the attributes populated in shef? or is there
another way I can test them?
TAI,
Chaim