I'm able to set attributes in role files as documented but I'm not able to access attributes already set by cookbooks that I'm using.
For example within /roles/appserver.rb:
name "appserver"
run_list(%w{
recipe[tomcat::default]
})
default_attributes(
:tomcat => {
:java_options => "-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=" + node[:tomcat][:log_dir]
}
)
What I get is an exception stating chef can't find the 'node' method/variable.
Thanks