Is it possible to specify attribute values in Chef Solo's JSON? I have a solo.json with a run list and I would like to specify the attributes there. The Chef documentation seems to indicate it should be possible for me to do something like:
{
"hostname": {
"test": "value2"
},
"default_attributes": {
"hostname": {
"test": "value3"
}
},
"override_attributes": {
"hostname": {
"test": "value4"
}
},
"default": {
"hostname": {
"test": "value5"
}
},
"run_list": [
"recipe[hostname::default]"
]
}
However, whenever I try to access the value in my recipe:
p node['hostname']['test']
I just get the value defined in attributes/default.rb, and if I do not define it there, I get a nil value back.
Is there a way to reference these values?
node.overridevalues and then runchef-solo -c ~/.chef/solo.rb -j ~/.chef/solo.json -o my_overrides_cookbook,recipe[recipe_to_run]to guarantee it overrides your defaults - Display Name is missing