Uninitialized Attributes top level causes error
Opened this issue · 2 comments
[2012-11-01T03:02:10+00:00] INFO: Storing updated cookbooks/user/attributes/default.rb in the cache.
Recipe Compile Error in /var/chef/cache/cookbooks/user/attributes/default.rb
IndexError
string not matched
Cookbook Trace:
/var/chef/cache/cookbooks/user/attributes/default.rb:24:in []=' /var/chef/cache/cookbooks/user/attributes/default.rb:24:in
from_file'
Relevant File Content:
/var/chef/cache/cookbooks/user/attributes/default.rb:
19: # limitations under the License.
20: #
21:
22: case platform
23: when 'debian','ubuntu','redhat','centos','amazon','scientific','fedora','freebsd','suse'
24>> default['user']['home_root'] = "/home"
25: default['user']['default_shell'] = "/bin/bash"
26: when 'openbsd'
27: default['user']['home_root'] = "/home"
28: default['user']['default_shell'] = "/bin/ksh"
29: when 'mac_os_x', 'mac_os_x_server'
30: default['user']['home_root'] = "/Users"
31: default['user']['default_shell'] = "/bin/bash"
32: else
33: default['user']['home_root'] = "/home"
[2012-11-01T03:02:10+00:00] ERROR: Running exception handlers
[2012-11-01T03:02:10+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2012-11-01T03:02:10+00:00] ERROR: Exception handlers complete
[2012-11-01T03:02:10+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-11-01T03:02:10+00:00] FATAL: IndexError: string not matched
chef should autovivify the attributes. I'll try to reproduce this. ideally we should not need to initialize the parent attribute